summaryrefslogtreecommitdiff
path: root/indra/newview/llversioninfo.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-04-30 08:57:29 -0400
committerOz Linden <oz@lindenlab.com>2013-04-30 08:57:29 -0400
commit889d02b52d9d53b59e1bab953b8e19a60c49fd4f (patch)
tree7991f8b9b0972027cc2bc7301a99779e9850141f /indra/newview/llversioninfo.cpp
parentca7de31a6c5031bb928d283362e96bb63e37ce85 (diff)
parent2ef8fc41e74b6949e02a7715b2b8399094ebd3ea (diff)
merge changes for CHOP-913
Diffstat (limited to 'indra/newview/llversioninfo.cpp')
-rwxr-xr-xindra/newview/llversioninfo.cpp55
1 files changed, 27 insertions, 28 deletions
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp
index 673d0c24cf..6a8fad0134 100755
--- a/indra/newview/llversioninfo.cpp
+++ b/indra/newview/llversioninfo.cpp
@@ -26,73 +26,76 @@
*/
#include "llviewerprecompiledheaders.h"
+#include <iostream>
+#include <sstream>
#include "llversioninfo.h"
-#include "llversionviewer.h"
+#if ! defined(LL_VIEWER_CHANNEL) \
+ || ! defined(LL_VIEWER_VERSION_MAJOR) \
+ || ! defined(LL_VIEWER_VERSION_MINOR) \
+ || ! defined(LL_VIEWER_VERSION_PATCH) \
+ || ! defined(LL_VIEWER_VERSION_BUILD)
+ #error "Channel or Version information is undefined"
+#endif
+
+const char * const LL_CHANNEL = LL_VIEWER_CHANNEL;
//
-// Set the version numbers in indra/llcommon/llversionviewer.h
+// Set the version numbers in indra/VIEWER_VERSION
//
//static
S32 LLVersionInfo::getMajor()
{
- return LL_VERSION_MAJOR;
+ return LL_VIEWER_VERSION_MAJOR;
}
//static
S32 LLVersionInfo::getMinor()
{
- return LL_VERSION_MINOR;
+ return LL_VIEWER_VERSION_MINOR;
}
//static
S32 LLVersionInfo::getPatch()
{
- return LL_VERSION_PATCH;
+ return LL_VIEWER_VERSION_PATCH;
}
//static
S32 LLVersionInfo::getBuild()
{
- return LL_VERSION_BUILD;
+ return LL_VIEWER_VERSION_BUILD;
}
//static
const std::string &LLVersionInfo::getVersion()
{
static std::string version("");
-
if (version.empty())
{
- // cache the version string
std::ostringstream stream;
- stream << LL_VERSION_MAJOR << "."
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH << "."
- << LL_VERSION_BUILD;
+ stream << LLVersionInfo::getShortVersion() << "." << LLVersionInfo::getBuild();
+ // cache the version string
version = stream.str();
}
-
return version;
}
//static
const std::string &LLVersionInfo::getShortVersion()
{
- static std::string version("");
-
- if (version.empty())
+ static std::string short_version("");
+ if(short_version.empty())
{
// cache the version string
std::ostringstream stream;
- stream << LL_VERSION_MAJOR << "."
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH;
- version = stream.str();
+ stream << LL_VIEWER_VERSION_MAJOR << "."
+ << LL_VIEWER_VERSION_MINOR << "."
+ << LL_VIEWER_VERSION_PATCH;
+ short_version = stream.str();
}
-
- return version;
+ return short_version;
}
namespace
@@ -100,7 +103,7 @@ 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);
+ std::string sWorkingChannelName(LL_VIEWER_CHANNEL);
// Storage for the "version and channel" string.
// This will get reset too.
@@ -113,11 +116,7 @@ const std::string &LLVersionInfo::getChannelAndVersion()
if (sVersionChannel.empty())
{
// cache the version string
- std::ostringstream stream;
- stream << LLVersionInfo::getChannel()
- << " "
- << LLVersionInfo::getVersion();
- sVersionChannel = stream.str();
+ sVersionChannel = LLVersionInfo::getChannel() + " " + LLVersionInfo::getVersion();
}
return sVersionChannel;