Browse Source

Minor bits of additional RemoteTools cleanup

Signed-off-by: puvvadar <[email protected]>
puvvadar 3 years ago
parent
commit
cb4faef17a

+ 2 - 2
Gems/RemoteTools/Code/Source/RemoteToolsSystemComponent.cpp

@@ -71,7 +71,7 @@ namespace RemoteTools
 
     RemoteToolsSystemComponent::RemoteToolsSystemComponent()
     {
-#if !defined(_RELEASE)
+#if defined(ENABLE_REMOTE_TOOLS)
         if (AzFramework::RemoteToolsInterface::Get() == nullptr)
         {
             AzFramework::RemoteToolsInterface::Register(this);
@@ -81,7 +81,7 @@ namespace RemoteTools
 
     RemoteToolsSystemComponent::~RemoteToolsSystemComponent()
     {
-#if !defined(_RELEASE)
+#if defined(ENABLE_REMOTE_TOOLS)
         if (AzFramework::RemoteToolsInterface::Get() == this)
         {
             AzFramework::RemoteToolsInterface::Unregister(this);

+ 1 - 5
Gems/RemoteTools/Code/Tests/RemoteToolsTest.cpp

@@ -11,8 +11,8 @@
 #include <AzCore/Console/LoggerSystemComponent.h>
 #include <AzCore/Interface/Interface.h>
 #include <AzCore/Name/NameDictionary.h>
-#include <AzCore/Serialization/SerializeContext.h>
 #include <AzCore/UnitTest/TestTypes.h>
+#include <AzCore/UnitTest/UnitTest.h>
 #include <AzFramework/Network/IRemoteTools.h>
 #include <AzNetworking/Framework/NetworkingSystemComponent.h>
 
@@ -33,10 +33,8 @@ namespace UnitTest
             SetupAllocator();
             AZ::NameDictionary::Create();
 
-            m_serializeContext = aznew AZ::SerializeContext(true, true);
             m_networkingSystemComponent = AZStd::make_unique<AzNetworking::NetworkingSystemComponent>();
             m_remoteToolsSystemComponent = AZStd::make_unique<RemoteToolsSystemComponent>();
-            m_remoteToolsSystemComponent->Reflect(m_serializeContext);
             m_remoteTools = m_remoteToolsSystemComponent.get();
         }
 
@@ -45,7 +43,6 @@ namespace UnitTest
             m_remoteTools = nullptr;
             m_remoteToolsSystemComponent.reset();
             m_networkingSystemComponent.reset();
-            delete m_serializeContext;
 
             AZ::NameDictionary::Destroy();
             TeardownAllocator();
@@ -54,7 +51,6 @@ namespace UnitTest
         AZStd::unique_ptr<AzNetworking::NetworkingSystemComponent> m_networkingSystemComponent;
         AZStd::unique_ptr<RemoteToolsSystemComponent> m_remoteToolsSystemComponent;
         AzFramework::IRemoteTools* m_remoteTools;
-        AZ::SerializeContext* m_serializeContext;
     };
 
     TEST_F(RemoteToolsTests, TEST_RemoteToolsEmptyRegistry)