| 48 | } |
| 49 | |
| 50 | void Animation::finish(Layer& layer, bool didComplete) { |
| 51 | auto applier = std::move(_applier); |
| 52 | _applier = nullptr; |
| 53 | if (applier) { |
| 54 | applier(layer, 1.0); |
| 55 | } |
| 56 | |
| 57 | auto completions = std::move(_completions); |
| 58 | for (const auto& completion : completions) { |
| 59 | completion(didComplete); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | void Animation::addCompletion(AnimationCompletion&& completion) { |
| 64 | _completions.emplace_back(std::move(completion)); |
no outgoing calls