Fix for "front() called on empty vector" Errors on debug builds.

Now using the C++11 vector.data() to fetch the proper pointer instead of $vector.front()
- Which fails on empty vectors because of the standard compiler setting _ITERATOR_DEBUG_LEVEL=2 when debugging
This commit is contained in:
kalvindukes
2018-09-26 19:23:46 +02:00
parent ba99a9a308
commit 9481d94c98
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -237,7 +237,7 @@ namespace render {
bufferFlushes += 1;
vbFlushCounts[reason] += 1;
RenderStep* pSteps = &steps.front();
RenderStep* pSteps = steps.data();
for(unsigned i = 0, cnt = (unsigned)steps.size(); i < cnt; ++i) {
auto& step = pSteps[i];
shaderUniforms = step.shaderCache;