Permalink
Browse files

turns out min_int was not a good though. Assigned ID are not from max…

… int down and normal ones should be 0 and up
  • Loading branch information...
1 parent fc0498e commit 70df0b8663df5c1f4ddcbb224a8c611eb2839799 @martijnberger martijnberger committed Apr 5, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/yafraycore/scene.cc
View
@@ -48,7 +48,7 @@ scene_t::scene_t(): volIntegrator(0), camera(0), imageFilm(0), tree(0), vtree(0
{
state.changes = C_ALL;
state.stack.push_front(READY);
- state.nextFreeID = std::numeric_limits<int>::min();
+ state.nextFreeID = std::numeric_limits<int>::max();
state.curObj = 0;
}
@@ -912,11 +912,11 @@ objID_t scene_t::getNextFreeID()
if(meshes.find(id) != meshes.end())
{
Y_ERROR << "Scene: Object ID already in use!" << yendl;
- ++state.nextFreeID;
+ --state.nextFreeID;
return getNextFreeID();
}
- ++state.nextFreeID;
+ --state.nextFreeID;
return id;
}

0 comments on commit 70df0b8

Please sign in to comment.