From 78ae3fdb805733266ae0a644b8ab1305d9f93a2c Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 23 Dec 2021 14:19:05 -0800 Subject: [PATCH] Removes tools.cpp from Gems/GraphCanvas Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Gems/GraphCanvas/Code/Source/tools.cpp | 85 ------------------- Gems/GraphCanvas/Code/graphcanvas_files.cmake | 1 - 2 files changed, 86 deletions(-) delete mode 100644 Gems/GraphCanvas/Code/Source/tools.cpp diff --git a/Gems/GraphCanvas/Code/Source/tools.cpp b/Gems/GraphCanvas/Code/Source/tools.cpp deleted file mode 100644 index 79d32dbf5e..0000000000 --- a/Gems/GraphCanvas/Code/Source/tools.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include -#include -#include - -#include - -////////// -// Tools -////////// - -QDebug operator<<(QDebug debug, const AZ::Entity* entity) -{ - QDebugStateSaver saver(debug); - if (!entity) - { - debug.nospace() << "Entity(nullptr)"; - return debug; - } - - const AZStd::string id = entity->GetId().ToString(); - const AZStd::string& name = entity->GetName(); - - QString state; - switch (entity->GetState()) - { - case AZ::Entity::State::Init: - state = "ES_INIT"; - break; - case AZ::Entity::State::Constructed: - state = "ES_CONSTRUCTED"; - break; - case AZ::Entity::State::Active: - state = "ES_ACTIVE"; - break; - default: - state = "ES_BAD_STATE"; - break; - } - - debug.nospace() << "Entity(" << QString(id.c_str()) << ", " << state << ", \"" << QString(name.c_str()) << "\")"; - - return debug; -} - -QDebug operator<<(QDebug debug, const AZ::EntityId& entity) -{ - const AZ::Entity* actual = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(actual, &AZ::ComponentApplicationRequests::FindEntity, entity); - - return operator<<(debug, actual); -} - -QDebug operator<<(QDebug debug, const AZ::Component* component) -{ - QDebugStateSaver saver(debug); - if (!component) - { - debug.nospace() << "Component(nullptr)"; - return debug; - } - - std::ostringstream converter; - converter << std::hex << component->GetId(); - - debug.nospace() << "Component(" << QString::fromStdString(converter.str()) << " {" << component->GetEntity() << "})"; - - return debug; -} - -QDebug operator<<(QDebug debug, const AZ::Vector2& position) -{ - QDebugStateSaver saver(debug); - debug.nospace() << "Vector2(" << position.GetX() << ", " << position.GetY() << ")"; - return debug; -} diff --git a/Gems/GraphCanvas/Code/graphcanvas_files.cmake b/Gems/GraphCanvas/Code/graphcanvas_files.cmake index cf586e16ac..8ba9fd3073 100644 --- a/Gems/GraphCanvas/Code/graphcanvas_files.cmake +++ b/Gems/GraphCanvas/Code/graphcanvas_files.cmake @@ -16,7 +16,6 @@ set(FILES Source/GraphCanvas.h Source/GraphCanvasModule.h Source/GraphCanvasEditorModule.cpp - Source/tools.cpp Source/Components/BookmarkManagerComponent.cpp Source/Components/BookmarkManagerComponent.h Source/Components/GeometryComponent.cpp