Optimized DTSC::File::atKeyFrame() further.
This commit is contained in:
parent
7ecf95e399
commit
b1ec75600f
1 changed files with 4 additions and 6 deletions
10
lib/dtsc.cpp
10
lib/dtsc.cpp
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue