SL-821: Add LL_TO_WSTRING() macro to llpreprocessor.h.
Also use existing LL_TO_STRING() macro to stringize LL_VIEWER_CHANNEL in llversioninfo.cpp and its tests.master
parent
41f4e85473
commit
ed891c60de
|
|
@ -198,6 +198,8 @@
|
|||
|
||||
#define LL_TO_STRING_HELPER(x) #x
|
||||
#define LL_TO_STRING(x) LL_TO_STRING_HELPER(x)
|
||||
#define LL_TO_WSTRING_HELPER(x) L#x
|
||||
#define LL_TO_WSTRING(x) LL_TO_WSTRING_HELPER(x)
|
||||
#define LL_FILE_LINENO_MSG(msg) __FILE__ "(" LL_TO_STRING(__LINE__) ") : " msg
|
||||
#define LL_GLUE_IMPL(x, y) x##y
|
||||
#define LL_GLUE_TOKENS(x, y) LL_GLUE_IMPL(x, y)
|
||||
|
|
|
|||
|
|
@ -101,14 +101,11 @@ namespace
|
|||
{
|
||||
// LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The
|
||||
// macro expands to the string name of the channel, but without quotes. We
|
||||
// need to turn it into a quoted string. This macro trick does that.
|
||||
#define stringize_inner(x) #x
|
||||
#define stringize_outer(x) stringize_inner(x)
|
||||
|
||||
// need to turn it into a quoted string. LL_TO_STRING() does that.
|
||||
/// Storage of the channel name the viewer is using.
|
||||
// The channel name is set by hardcoded constant,
|
||||
// or by calling LLVersionInfo::resetChannel()
|
||||
std::string sWorkingChannelName(stringize_outer(LL_VIEWER_CHANNEL));
|
||||
std::string sWorkingChannelName(LL_TO_STRING(LL_VIEWER_CHANNEL));
|
||||
|
||||
// Storage for the "version and channel" string.
|
||||
// This will get reset too.
|
||||
|
|
|
|||
|
|
@ -33,10 +33,8 @@
|
|||
|
||||
// LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The
|
||||
// macro expands to the string name of the channel, but without quotes. We
|
||||
// need to turn it into a quoted string. This macro trick does that.
|
||||
#define stringize_inner(x) #x
|
||||
#define stringize_outer(x) stringize_inner(x)
|
||||
#define ll_viewer_channel stringize_outer(LL_VIEWER_CHANNEL)
|
||||
// need to turn it into a quoted string. LL_TO_STRING() does that.
|
||||
#define ll_viewer_channel LL_TO_STRING(LL_VIEWER_CHANNEL)
|
||||
|
||||
namespace tut
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue