diff options
author | brad kittenbrink <brad@lindenlab.com> | 2010-11-19 12:09:18 -0800 |
---|---|---|
committer | brad kittenbrink <brad@lindenlab.com> | 2010-11-19 12:09:18 -0800 |
commit | b6edd74775e07ce392b0a1785cfc61338c890dad (patch) | |
tree | c01e3111d3016e5f6e5453f88d8e5aa30c7ced19 /indra/newview/llversioninfo.cpp | |
parent | 1139584b026db86fd20364d0eb21b6e2351f8fb1 (diff) | |
parent | 8d21105a8c2b6bff98b4f3b91a614a4710d4b7ea (diff) |
Merged latest lindenlab/viewer-development with mani_linden/viewer-development for bacground updater work.
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. } |