replaced static tutorial_shared_path string with #define

Former-commit-id: bd37fbf7c1
This commit is contained in:
Daniel Crispell
2015-10-17 23:55:35 -04:00
parent 4df6057189
commit 6eae3ca6b0
51 changed files with 70 additions and 79 deletions
+1 -10
View File
@@ -1,17 +1,8 @@
#ifndef tutorial_shared_path_h_included
#define tutorial_shared_path_h_included
// convert the argument to a string constant
#define STRINGIZE2(s) #s
// need an extra level of macro indirection for preprocessor token stringification to work
#define STRINGIZE(s) STRINGIZE2(s)
#include <string>
#ifndef TUTORIAL_SHARED_PATH
const std::string tutorial_shared_path("../shared");
#else
const std::string tutorial_shared_path( STRINGIZE(TUTORIAL_SHARED_PATH) );
#define TUTORIAL_SHARED_PATH "../shared"
#endif
#endif