diff options
author | brad kittenbrink <brad@lindenlab.com> | 2010-11-19 15:40:05 -0800 |
---|---|---|
committer | brad kittenbrink <brad@lindenlab.com> | 2010-11-19 15:40:05 -0800 |
commit | fd78866bcdf712aaefecfb74d7edaecb30c91b27 (patch) | |
tree | 235398d36401c68fc841389bb11984d94d36d7db /indra/newview/llversioninfo.cpp | |
parent | 3337ef16cee97e26b45aa07518d34d031bdc75fa (diff) | |
parent | b6edd74775e07ce392b0a1785cfc61338c890dad (diff) |
Merged latest lindenlab/viewer-development with mani_linden/viewer-development
Diffstat (limited to 'indra/newview/llversioninfo.cpp')
-rw-r--r-- | indra/newview/llversioninfo.cpp | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 733d05834a..53994c68f2 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -95,9 +95,42 @@ const std::string &LLVersionInfo::getShortVersion() return version; } +namespace +{ + /// 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(LL_CHANNEL); + + // Storage for the "version and channel" string. + // This will get reset too. + std::string sVersionChannel(""); +} + +//static +const std::string &LLVersionInfo::getVersionAndChannel() +{ + if (sVersionChannel.empty()) + { + // cache the version string + std::ostringstream stream; + stream << LLVersionInfo::getVersion() + << " " + << LLVersionInfo::getChannel(); + sVersionChannel = stream.str(); + } + + return sVersionChannel; +} + //static const std::string &LLVersionInfo::getChannel() { - static std::string name(LL_CHANNEL); - return name; + return sWorkingChannelName; +} + +void LLVersionInfo::resetChannel(const std::string& channel) +{ + sWorkingChannelName = channel; + sVersionChannel.clear(); // Reset version and channel string til next use. } |