Skip to content

Commit 9e98c72

Browse files
zeyapmeta-codesync[bot]
authored andcommitted
Move using declarations into AnimationBackend class (#54057)
Summary: Pull Request resolved: #54057 ## 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) Reviewed By: sammy-SC Differential Revision: D83867098 fbshipit-source-id: a50144bbbd1b441e3ef7b2884a19b091c3190c44
1 parent 4a88282 commit 9e98c72

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)