From bad76fd0f18e82279c2812773727fec884b22c9b Mon Sep 17 00:00:00 2001 From: Krishty Date: Mon, 16 Jan 2023 08:18:36 +0100 Subject: [PATCH] Replace Variables With Literals --- code/AssetLib/Blender/BlenderBMesh.cpp | 3 +-- code/AssetLib/Blender/BlenderLoader.cpp | 3 +-- code/AssetLib/Blender/BlenderTessellator.cpp | 6 ++---- code/AssetLib/C4D/C4DImporter.cpp | 3 +-- code/AssetLib/FBX/FBXImporter.cpp | 3 +-- code/AssetLib/IFC/IFCLoader.cpp | 3 +-- code/AssetLib/XGL/XGLLoader.cpp | 3 +-- 7 files changed, 8 insertions(+), 16 deletions(-) diff --git a/code/AssetLib/Blender/BlenderBMesh.cpp b/code/AssetLib/Blender/BlenderBMesh.cpp index b15da185d..a82e7c678 100644 --- a/code/AssetLib/Blender/BlenderBMesh.cpp +++ b/code/AssetLib/Blender/BlenderBMesh.cpp @@ -52,8 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { template <> const char *LogFunctions::Prefix() { - static auto prefix = "BLEND_BMESH: "; - return prefix; + return "BLEND_BMESH: "; } } // namespace Assimp diff --git a/code/AssetLib/Blender/BlenderLoader.cpp b/code/AssetLib/Blender/BlenderLoader.cpp index f1fb0246d..269c90b96 100644 --- a/code/AssetLib/Blender/BlenderLoader.cpp +++ b/code/AssetLib/Blender/BlenderLoader.cpp @@ -80,8 +80,7 @@ namespace Assimp { template <> const char *LogFunctions::Prefix() { - static auto prefix = "BLEND: "; - return prefix; + return "BLEND: "; } } // namespace Assimp diff --git a/code/AssetLib/Blender/BlenderTessellator.cpp b/code/AssetLib/Blender/BlenderTessellator.cpp index d3ef5ae5e..9c78d0a2a 100644 --- a/code/AssetLib/Blender/BlenderTessellator.cpp +++ b/code/AssetLib/Blender/BlenderTessellator.cpp @@ -62,8 +62,7 @@ namspace Assimp { template< > const char* LogFunctions< BlenderTessellatorGL >::Prefix() { - static auto prefix = "BLEND_TESS_GL: "; - return prefix; + return "BLEND_TESS_GL: "; } } @@ -259,8 +258,7 @@ namespace Assimp { template< > const char* LogFunctions< BlenderTessellatorP2T >::Prefix() { - static auto prefix = "BLEND_TESS_P2T: "; - return prefix; + return "BLEND_TESS_P2T: "; } } diff --git a/code/AssetLib/C4D/C4DImporter.cpp b/code/AssetLib/C4D/C4DImporter.cpp index 06d7a3412..f21ff8602 100644 --- a/code/AssetLib/C4D/C4DImporter.cpp +++ b/code/AssetLib/C4D/C4DImporter.cpp @@ -86,8 +86,7 @@ void GetWriterInfo(int &id, String &appname) { namespace Assimp { template<> const char* LogFunctions::Prefix() { - static auto prefix = "C4D: "; - return prefix; + return "C4D: "; } } diff --git a/code/AssetLib/FBX/FBXImporter.cpp b/code/AssetLib/FBX/FBXImporter.cpp index 7ff194905..7a106d535 100644 --- a/code/AssetLib/FBX/FBXImporter.cpp +++ b/code/AssetLib/FBX/FBXImporter.cpp @@ -62,8 +62,7 @@ namespace Assimp { template <> const char *LogFunctions::Prefix() { - static auto prefix = "FBX: "; - return prefix; + return "FBX: "; } } // namespace Assimp diff --git a/code/AssetLib/IFC/IFCLoader.cpp b/code/AssetLib/IFC/IFCLoader.cpp index 908dc8dfa..ee718681e 100644 --- a/code/AssetLib/IFC/IFCLoader.cpp +++ b/code/AssetLib/IFC/IFCLoader.cpp @@ -73,8 +73,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { template <> const char *LogFunctions::Prefix() { - static auto prefix = "IFC: "; - return prefix; + return "IFC: "; } } // namespace Assimp diff --git a/code/AssetLib/XGL/XGLLoader.cpp b/code/AssetLib/XGL/XGLLoader.cpp index 7cacbca4d..04e303370 100644 --- a/code/AssetLib/XGL/XGLLoader.cpp +++ b/code/AssetLib/XGL/XGLLoader.cpp @@ -65,8 +65,7 @@ namespace Assimp { // this has to be in here because LogFunctions is in ::Assimp template <> const char *LogFunctions::Prefix() { - static auto prefix = "XGL: "; - return prefix; + return "XGL: "; } } // namespace Assimp