Move string definitions into conditional block to fix unused variable warnings

pull/4974/head
Turo Lamminen 2023-02-20 14:53:45 +02:00 committed by Turo Lamminen
parent 7de21694e9
commit 2d448616d0
1 changed files with 10 additions and 8 deletions

View File

@ -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) {