Optimized DTSC::File::atKeyFrame() further.

This commit is contained in:
Thulinma 2013-10-16 10:49:55 +02:00
parent 7ecf95e399
commit b1ec75600f

View file

@ -1012,12 +1012,10 @@ bool DTSC::File::atKeyframe(){
return true; return true;
} }
long long int bTime = jsonbuffer["time"].asInt(); long long int bTime = jsonbuffer["time"].asInt();
for (std::set<int>::iterator selectIt = selectedTracks.begin(); selectIt != selectedTracks.end(); selectIt++){ JSON::Value & keys = getTrackById(jsonbuffer["trackid"].asInt())["keys"];
JSON::Value & keys = getTrackById((*selectIt))["keys"]; for (JSON::ArrIter aIt = keys.ArrBegin(); aIt != keys.ArrEnd(); ++aIt){
for (JSON::ArrIter aIt = keys.ArrBegin(); aIt != keys.ArrEnd(); aIt++){ if ((*aIt)["time"].asInt() >= bTime){
if ((*aIt)["time"].asInt() == bTime){ return ((*aIt)["time"].asInt() == bTime);
return true;
}
} }
} }
return false; return false;