Skip to content

Instantly share code, notes, and snippets.

@dacap
Created September 15, 2015 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacap/f0bcc471241eec161b45 to your computer and use it in GitHub Desktop.
Save dacap/f0bcc471241eec161b45 to your computer and use it in GitHub Desktop.
CelIterator LayerImage::findCelIterator(frame_t frame)
{
auto first = getCelBegin();
auto end = getCelEnd();
first = std::lower_bound(
first, end, nullptr,
[frame](Cel* cel, Cel*) -> bool {
return cel->frame() < frame;
});
if (first != end && (*first)->frame() == frame)
return first;
else
return end;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment