Merge pull request #1611 from JulianGro/cherrypick_warning_fixes
Cherry-pick warning fixes
This commit is contained in:
commit
b6fbd63dd5
@ -425,7 +425,7 @@ void Stats::updateStats(bool force) {
|
||||
gpu::ContextStats gpuFrameStats;
|
||||
gpuContext->getFrameStats(gpuFrameStats);
|
||||
|
||||
STAT_UPDATE(drawcalls, gpuFrameStats._DSNumDrawcalls);
|
||||
STAT_UPDATE(drawcalls, (quint32)gpuFrameStats._DSNumDrawcalls);
|
||||
STAT_UPDATE(lodTargetFramerate, DependencyManager::get<LODManager>()->getLODTargetFPS());
|
||||
STAT_UPDATE(lodAngle, DependencyManager::get<LODManager>()->getLODAngleDeg());
|
||||
|
||||
|
@ -50,7 +50,10 @@ void GLBackend::do_setProjectionJitterSequence(const Batch& batch, size_t paramO
|
||||
auto& projectionJitter = _transform._projectionJitter;
|
||||
projectionJitter._offsetSequence.resize(count);
|
||||
if (count) {
|
||||
memcpy(projectionJitter._offsetSequence.data(), batch.readData(batch._params[paramOffset + 1]._uint), sizeof(Vec2) * count);
|
||||
const Vec2* data = (Vec2 *)batch.readData(batch._params[paramOffset + 1]._uint);
|
||||
for (uint32 i = 0; i < count; i++) {
|
||||
projectionJitter._offsetSequence[i] = data[i];
|
||||
}
|
||||
projectionJitter._offset = projectionJitter._offsetSequence[projectionJitter._currentSampleIndex % count];
|
||||
} else {
|
||||
projectionJitter._offset = Vec2(0.0f);
|
||||
|
@ -198,9 +198,13 @@ public:
|
||||
|
||||
//Template iterator with random access on the buffer sysmem
|
||||
template<typename T>
|
||||
class Iterator : public std::iterator<std::random_access_iterator_tag, T, Index, T*, T&>
|
||||
{
|
||||
class Iterator {
|
||||
public:
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
using value_type = T;
|
||||
using difference_type = Index;
|
||||
using pointer = const value_type*;
|
||||
using reference = const value_type&;
|
||||
|
||||
Iterator(T* ptr = NULL, int stride = sizeof(T)): _ptr(ptr), _stride(stride) { }
|
||||
Iterator(const Iterator<T>& iterator) = default;
|
||||
|
Loading…
x
Reference in New Issue
Block a user