Small performance optimization.

This commit is contained in:
Faerbit 2015-06-01 16:17:37 +02:00
parent 90dbd52aca
commit b280ad8c12

View File

@ -352,9 +352,10 @@ void Graphics::render(double time)
for(unsigned int i = 0; i<shadowRenderQueue.size(); i++) {
bool enqueued = false;
for(unsigned int j = 0; j<renderQueue.size(); j++){
if (shadowRenderQueue.at(i).currentPriority > std::get<1>(renderQueue.at(j)) && ! enqueued){
if (shadowRenderQueue.at(i).currentPriority > std::get<1>(renderQueue.at(j))){
renderQueue.at(j) = std::make_tuple(shadowRenderQueue.at(i).light, shadowRenderQueue.at(i).currentPriority, i);
enqueued = true;
break;
}
}
if (enqueued) {