Skip to content

Commit 8435533

Browse files
zeyapfacebook-github-bot
authored andcommitted
Move using declarations into AnimationBackend class (facebook#54057)
Summary: ## Changelog: [General] [Changed] - Move using declarations into AnimationBackend class names like `facebook::react::Callback` is a bit too generic and it'll be included in the scope whenever AnimationBackend.h is included in; `StartOnRenderCallback` already exists in c++ native animated (there we also nest the `using`s under class) Differential Revision: D83867098
1 parent b3341d3 commit 8435533

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

packages/react-native/ReactCommon/react/renderer/animationbackend/AnimationBackend.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@ struct AnimationMutation {
2424
};
2525

2626
using AnimationMutations = std::vector<AnimationMutation>;
27-
using Callback = std::function<AnimationMutations(float)>;
28-
using StartOnRenderCallback = std::function<void(std::function<void()>&&)>;
29-
using StopOnRenderCallback = std::function<void()>;
30-
using DirectManipulationCallback =
31-
std::function<void(Tag, const folly::dynamic&)>;
32-
using FabricCommitCallback =
33-
std::function<void(std::unordered_map<Tag, folly::dynamic>&)>;
3427

3528
class AnimationBackend {
3629
public:
30+
using Callback = std::function<AnimationMutations(float)>;
31+
using StartOnRenderCallback = std::function<void(std::function<void()>&&)>;
32+
using StopOnRenderCallback = std::function<void()>;
33+
using DirectManipulationCallback =
34+
std::function<void(Tag, const folly::dynamic&)>;
35+
using FabricCommitCallback =
36+
std::function<void(std::unordered_map<Tag, folly::dynamic>&)>;
37+
3738
std::vector<Callback> callbacks;
3839
const StartOnRenderCallback startOnRenderCallback_;
3940
const StopOnRenderCallback stopOnRenderCallback_;

0 commit comments

Comments
 (0)