summaryrefslogtreecommitdiff
path: root/indra/newview/llversioninfo.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-11-19 17:59:55 -0500
committerOz Linden <oz@lindenlab.com>2013-11-19 17:59:55 -0500
commit0031e9a97be1bf6e9fe773c23506494d09ce91ae (patch)
tree220f195c82174b7cc8e94dceb2553e59fe5837a5 /indra/newview/llversioninfo.cpp
parentb7edc965bc77ab21e9a1e3f6b424299a50053529 (diff)
parentebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff)
merge up to 3.6.10-release; some of the storm-68 changes lost
Diffstat (limited to 'indra/newview/llversioninfo.cpp')
-rwxr-xr-x[-rw-r--r--]indra/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 100644..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;