From 2d448616d03f584cb4fa0becf02a03359db2bfad Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Mon, 20 Feb 2023 14:53:45 +0200 Subject: [PATCH] Move string definitions into conditional block to fix unused variable warnings --- tools/assimp_cmd/Info.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/assimp_cmd/Info.cpp b/tools/assimp_cmd/Info.cpp index a21a39201..d67974269 100644 --- a/tools/assimp_cmd/Info.cpp +++ b/tools/assimp_cmd/Info.cpp @@ -55,26 +55,28 @@ constexpr char AICMD_MSG_INFO_HELP_E[] = "\t-v,--verbose: Print verbose info such as node transform data\n" "\t-s, --silent: Print only minimal info\n"; -constexpr char TREE_BRANCH_ASCII[] = "|-"; -constexpr char TREE_BRANCH_UTF8[] = "\xe2\x94\x9c\xe2\x95\xb4"; -constexpr char TREE_STOP_ASCII[] = "'-"; -constexpr char TREE_STOP_UTF8[] = "\xe2\x94\x94\xe2\x95\xb4"; -constexpr char TREE_CONTINUE_ASCII[] = "| "; -constexpr char TREE_CONTINUE_UTF8[] = "\xe2\x94\x82 "; // note: by default this is using utf-8 text. // this is well supported on pretty much any linux terminal. // if this causes problems on some platform, // put an #ifdef to use the ascii version for that platform. #ifdef _WIN32 +constexpr char TREE_BRANCH_ASCII[] = "|-"; +constexpr char TREE_STOP_ASCII[] = "'-"; +constexpr char TREE_CONTINUE_ASCII[] = "| "; + const char *TREE_BRANCH = TREE_BRANCH_ASCII; const char *TREE_STOP = TREE_STOP_ASCII; const char *TREE_CONTINUE = TREE_CONTINUE_ASCII; -#else +#else // _WIN32 +constexpr char TREE_BRANCH_UTF8[] = "\xe2\x94\x9c\xe2\x95\xb4"; +constexpr char TREE_STOP_UTF8[] = "\xe2\x94\x94\xe2\x95\xb4"; +constexpr char TREE_CONTINUE_UTF8[] = "\xe2\x94\x82 "; + const char *TREE_BRANCH = TREE_BRANCH_UTF8; const char *TREE_STOP = TREE_STOP_UTF8; const char *TREE_CONTINUE = TREE_CONTINUE_UTF8; -#endif +#endif // _WIN32 // ----------------------------------------------------------------------------------- unsigned int CountNodes(const aiNode *root) {