Sanitize identifier names before substituting them in C++ template files
This commit is contained in:
@@ -15,24 +15,24 @@
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <${Name}EditorSystemComponent.h>
|
||||
|
||||
namespace ${Name}
|
||||
namespace ${SanitizedCppName}
|
||||
{
|
||||
void ${Name}EditorSystemComponent::Reflect(AZ::ReflectContext* context)
|
||||
void ${SanitizedCppName}EditorSystemComponent::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<${Name}EditorSystemComponent, AZ::Component>()->Version(1);
|
||||
serializeContext->Class<${SanitizedCppName}EditorSystemComponent, AZ::Component>()->Version(1);
|
||||
}
|
||||
}
|
||||
|
||||
void ${Name}EditorSystemComponent::Activate()
|
||||
void ${SanitizedCppName}EditorSystemComponent::Activate()
|
||||
{
|
||||
AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
void ${Name}EditorSystemComponent::Deactivate()
|
||||
void ${SanitizedCppName}EditorSystemComponent::Deactivate()
|
||||
{
|
||||
AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
} // namespace ${Name}
|
||||
} // namespace ${SanitizedCppName}
|
||||
|
||||
Reference in New Issue
Block a user