Fixing up some colliding methods from the latest merge with master.
diff --git a/include/rive/artboard.hpp b/include/rive/artboard.hpp index 2266d57..4f45f57 100644 --- a/include/rive/artboard.hpp +++ b/include/rive/artboard.hpp
@@ -142,16 +142,6 @@ StateMachine* stateMachine(std::string name) const; StateMachine* stateMachine(size_t index) const; - /// Make an instance of a state machine given the name of the source state machine in this - /// artboard. The StateMachineInstance must be explictly deleted when no longer needed. - StateMachineInstance* stateMachineInstance(std::string name); - - /// Make an instance of a state machine given the index of the source state machine in this - /// artboard. The StateMachineInstance must be explictly deleted when no longer needed. - StateMachineInstance* stateMachineInstance(size_t index); - - size_t stateMachineCount() const { return m_StateMachines.size(); } - /// Make an instance of this artboard, must be explictly deleted when no /// longer needed. // Deprecated...
diff --git a/skia/viewer/src/main.cpp b/skia/viewer/src/main.cpp index 2298242..138a94c 100644 --- a/skia/viewer/src/main.cpp +++ b/skia/viewer/src/main.cpp
@@ -324,7 +324,7 @@ rive::Fit::contain, rive::Alignment::center, rive::AABB(0, 0, width, height), - artboard->bounds()); + artboardInstance->bounds()); renderer.transform(viewTransform); // Store the inverse view so we can later go from screen to world. rive::Mat2D::invert(gInverseViewTransform, viewTransform);
diff --git a/src/artboard.cpp b/src/artboard.cpp index f264595..e8ffc53 100644 --- a/src/artboard.cpp +++ b/src/artboard.cpp
@@ -517,22 +517,6 @@ return m_StateMachines[index]; } -StateMachineInstance* Artboard::stateMachineInstance(std::string name) { - StateMachine* machine = stateMachine(name); - if (machine != nullptr) { - return new StateMachineInstance(machine, this); - } - return nullptr; -} - -StateMachineInstance* Artboard::stateMachineInstance(size_t index) { - StateMachine* machine = stateMachine(index); - if (machine != nullptr) { - return new StateMachineInstance(machine, this); - } - return nullptr; -} - std::unique_ptr<ArtboardInstance> Artboard::instance() const { std::unique_ptr<ArtboardInstance> artboardClone(new ArtboardInstance); artboardClone->copy(*this);
diff --git a/test/state_machine_event_test.cpp b/test/state_machine_event_test.cpp index a849048..95a01ae 100644 --- a/test/state_machine_event_test.cpp +++ b/test/state_machine_event_test.cpp
@@ -67,7 +67,7 @@ REQUIRE(artboard != nullptr); REQUIRE(artboard->stateMachineCount() == 1); - auto stateMachine = artboard->stateMachineInstance(0); + auto stateMachine = artboard->stateMachineAt(0); REQUIRE(stateMachine != nullptr); // Advance artboard once so design time state is effectively in the transforms. artboard->advance(0.0f);