diff --git a/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp b/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp index 5f41c4fdd9..d23091db12 100644 --- a/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp +++ b/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp @@ -749,6 +749,15 @@ std::string RemoveListenerAfterAddingTest::subtitle() const // //DirectorEventTest // +DirectorEventTest::DirectorEventTest() +:_count1(0) +,_count2(0) +,_count3(0) +,_count4(0) +{ + +} + void DirectorEventTest::onEnter() { EventDispatcherTestDemo::onEnter(); diff --git a/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h b/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h index 0512b3c31d..2de772a6af 100644 --- a/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h +++ b/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h @@ -117,6 +117,7 @@ class DirectorEventTest : public EventDispatcherTestDemo { public: CREATE_FUNC(DirectorEventTest); + DirectorEventTest(); virtual void onEnter() override; virtual void onExit() override;