Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/WolfireGames/overgrowth.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Graphics/dynamiclightcollection.cpp')
-rw-r--r--Source/Graphics/dynamiclightcollection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Graphics/dynamiclightcollection.cpp b/Source/Graphics/dynamiclightcollection.cpp
index 2f6e3b18..98cebcf6 100644
--- a/Source/Graphics/dynamiclightcollection.cpp
+++ b/Source/Graphics/dynamiclightcollection.cpp
@@ -84,9 +84,9 @@ void DynamicLightCollection::Dispose() {
}
DynamicLight* DynamicLightCollection::GetLightFromID(int id) {
- for(int i=0, len=dynamic_lights.size(); i<len; ++i){
- if(dynamic_lights[i].id == id) {
- return &dynamic_lights[i];
+ for(auto & dynamic_light : dynamic_lights){
+ if(dynamic_light.id == id) {
+ return &dynamic_light;
}
}
return NULL;