summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2017-04-06 11:38:37 -0700
committerGlenn Glazer <coyot@lindenlab.com>2017-04-06 11:38:37 -0700
commit86cd7c7174440c09116e61c43172f17a9393568d (patch)
treeb4597fe84dd57b6c2b65621a38bc79f8cda005ed
parentd2db8239c21298f55a468100d0b3b06d2623bf67 (diff)
parenta83d66125012a18a395840d5e81cee08a548f1e9 (diff)
pull from gate
-rw-r--r--autobuild.xml22
-rw-r--r--indra/llcommon/llprocessor.cpp20
-rw-r--r--indra/llcommon/llsafehandle.h10
-rw-r--r--indra/newview/llparcelselection.cpp18
-rw-r--r--indra/newview/llparcelselection.h5
-rw-r--r--indra/newview/llselectmgr.cpp17
-rw-r--r--indra/newview/llselectmgr.h1
-rw-r--r--indra/newview/llviewerparcelmgr.cpp1
8 files changed, 30 insertions, 64 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 0edecf0934..5ad0b66336 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1634,9 +1634,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>fec7c114b6fa3737217e6ca4ec4735e4</string>
+ <string>7b769c4284bdbd5fce536395d1eab695</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/2449/5335/kdu-7.9.502436-darwin-502436.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/4054/11304/kdu-7.9.1.504041-darwin-504041.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1646,9 +1646,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>8178c2d9bde90c21f094d39eaf0125d9</string>
+ <string>a48db5cf79a4631090bfc968572d9953</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/2448/5334/kdu-7.9.502436-darwin64-502436.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/4052/11292/kdu-7.9.1.504041-darwin64-504041.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1670,9 +1670,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>739e6e5e63a0f3b474904f5dd502516a</string>
+ <string>99b0b22f87cebdd02c4cc954a7b3b465</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/2447/5325/kdu-7.9.502436-linux64-502436.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/4053/11298/kdu-7.9.1.504041-linux64-504041.tar.bz2</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1682,9 +1682,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>82beab4467d5bb5b972061c3674b7593</string>
+ <string>f3ff5982b3b5f02738044432dd77a2c1</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/2450/5344/kdu-7.9.502436-windows-502436.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/4055/11310/kdu-7.9.1.504041-windows-504041.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@@ -1694,16 +1694,16 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>8458af680eed4be44ea1246e4088e11b</string>
+ <string>3010fa35f412b36296342b07de06f1ca</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/2451/5349/kdu-7.9.502436-windows64-502436.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/4056/11316/kdu-7.9.1.504041-windows64-504041.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
- <string>7.9.502436</string>
+ <string>7.9.1.504041</string>
</map>
<key>libhunspell</key>
<map>
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp
index 65b4507e2d..446c312ca9 100644
--- a/indra/llcommon/llprocessor.cpp
+++ b/indra/llcommon/llprocessor.cpp
@@ -26,9 +26,11 @@
#include "linden_common.h"
#include "llprocessor.h"
-
+#include "llstring.h"
+#include "stringize.h"
#include "llerror.h"
+#include <iomanip>
//#include <memory>
#if LL_WINDOWS
@@ -188,7 +190,7 @@ namespace
case 0xF: return "Intel Pentium 4";
case 0x10: return "Intel Itanium 2 (IA-64)";
}
- return "Unknown";
+ return STRINGIZE("Intel <unknown 0x" << std::hex << composed_family << ">");
}
std::string amd_CPUFamilyName(int composed_family)
@@ -201,26 +203,26 @@ namespace
case 0xF: return "AMD K8";
case 0x10: return "AMD K8L";
}
- return "Unknown";
+ return STRINGIZE("AMD <unknown 0x" << std::hex << composed_family << ">");
}
std::string compute_CPUFamilyName(const char* cpu_vendor, int family, int ext_family)
{
const char* intel_string = "GenuineIntel";
const char* amd_string = "AuthenticAMD";
- if(!strncmp(cpu_vendor, intel_string, strlen(intel_string)))
+ if (LLStringUtil::startsWith(cpu_vendor, intel_string))
{
U32 composed_family = family + ext_family;
return intel_CPUFamilyName(composed_family);
}
- else if(!strncmp(cpu_vendor, amd_string, strlen(amd_string)))
+ else if (LLStringUtil::startsWith(cpu_vendor, amd_string))
{
U32 composed_family = (family == 0xF)
? family + ext_family
: family;
return amd_CPUFamilyName(composed_family);
}
- return "Unknown";
+ return STRINGIZE("Unrecognized CPU vendor <" << cpu_vendor << ">");
}
} // end unnamed namespace
@@ -258,8 +260,8 @@ public:
return hasExtension("Altivec");
}
- std::string getCPUFamilyName() const { return getInfo(eFamilyName, "Unknown").asString(); }
- std::string getCPUBrandName() const { return getInfo(eBrandName, "Unknown").asString(); }
+ std::string getCPUFamilyName() const { return getInfo(eFamilyName, "Unset family").asString(); }
+ std::string getCPUBrandName() const { return getInfo(eBrandName, "Unset brand").asString(); }
// This is virtual to support a different linux format.
// *NOTE:Mani - I didn't want to screw up server use of this data...
@@ -271,7 +273,7 @@ public:
out << "//////////////////////////" << std::endl;
out << "Processor Name: " << getCPUBrandName() << std::endl;
out << "Frequency: " << getCPUFrequency() << " MHz" << std::endl;
- out << "Vendor: " << getInfo(eVendor, "Unknown").asString() << std::endl;
+ out << "Vendor: " << getInfo(eVendor, "Unset vendor").asString() << std::endl;
out << "Family: " << getCPUFamilyName() << " (" << getInfo(eFamily, 0) << ")" << std::endl;
out << "Extended family: " << getInfo(eExtendedFamily, 0) << std::endl;
out << "Model: " << getInfo(eModel, 0) << std::endl;
diff --git a/indra/llcommon/llsafehandle.h b/indra/llcommon/llsafehandle.h
index 4226bf04f0..af1c26dd4f 100644
--- a/indra/llcommon/llsafehandle.h
+++ b/indra/llcommon/llsafehandle.h
@@ -112,10 +112,6 @@ public:
return *this;
}
-public:
- typedef Type* (*NullFunc)();
- static const NullFunc sNullFunc;
-
protected:
void ref()
{
@@ -155,6 +151,12 @@ protected:
return ptr == NULL ? sNullFunc() : ptr;
}
+ static Type* sNullFunc()
+ {
+ static Type sInstance;
+ return &sInstance;
+ }
+
protected:
Type* mPointer;
};
diff --git a/indra/newview/llparcelselection.cpp b/indra/newview/llparcelselection.cpp
index 4d1901adc9..5c62159b93 100644
--- a/indra/newview/llparcelselection.cpp
+++ b/indra/newview/llparcelselection.cpp
@@ -31,13 +31,6 @@
#include "llparcel.h"
-// static
-LLPointer<LLParcelSelection> LLParcelSelection::sNullSelection;
-
-template<>
- const LLSafeHandle<LLParcelSelection>::NullFunc
- LLSafeHandle<LLParcelSelection>::sNullFunc = LLParcelSelection::getNullParcelSelection;
-
//
// LLParcelSelection
//
@@ -87,14 +80,3 @@ bool LLParcelSelection::hasOthersSelected() const
{
return mSelectedOtherCount != 0;
}
-
-// static
-LLParcelSelection* LLParcelSelection::getNullParcelSelection()
-{
- if (sNullSelection.isNull())
- {
- sNullSelection = new LLParcelSelection;
- }
-
- return sNullSelection;
-}
diff --git a/indra/newview/llparcelselection.h b/indra/newview/llparcelselection.h
index 1cbdfc6f74..06d9141efb 100644
--- a/indra/newview/llparcelselection.h
+++ b/indra/newview/llparcelselection.h
@@ -35,6 +35,7 @@ class LLParcel;
class LLParcelSelection : public LLRefCount
{
friend class LLViewerParcelMgr;
+ friend class LLSafeHandle<LLParcelSelection>;
protected:
~LLParcelSelection();
@@ -61,8 +62,6 @@ public:
// Is the entire parcel selected, or just a part?
BOOL getWholeParcelSelected() const;
- static LLParcelSelection* getNullParcelSelection();
-
private:
void setParcel(LLParcel* parcel) { mParcel = parcel; }
@@ -73,8 +72,6 @@ private:
S32 mSelectedSelfCount;
S32 mSelectedOtherCount;
S32 mSelectedPublicCount;
-
- static LLPointer<LLParcelSelection> sNullSelection;
};
typedef LLSafeHandle<LLParcelSelection> LLParcelSelectionHandle;
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index ee7c22800a..cbcd905ab6 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -132,11 +132,6 @@ LLColor4 LLSelectMgr::sHighlightParentColor;
LLColor4 LLSelectMgr::sHighlightChildColor;
LLColor4 LLSelectMgr::sContextSilhouetteColor;
-static LLObjectSelection *get_null_object_selection();
-template<>
- const LLSafeHandle<LLObjectSelection>::NullFunc
- LLSafeHandle<LLObjectSelection>::sNullFunc = get_null_object_selection;
-
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// struct LLDeRezInfo
//
@@ -156,27 +151,15 @@ struct LLDeRezInfo
//
-static LLPointer<LLObjectSelection> sNullSelection;
-
//
// Functions
//
void LLSelectMgr::cleanupGlobals()
{
- sNullSelection = NULL;
LLSelectMgr::getInstance()->clearSelections();
}
-LLObjectSelection *get_null_object_selection()
-{
- if (sNullSelection.isNull())
- {
- sNullSelection = new LLObjectSelection;
- }
- return sNullSelection;
-}
-
// Build time optimization, generate this function once here
template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance();
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 2a893af266..fbf889b2f1 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -233,6 +233,7 @@ protected:
class LLObjectSelection : public LLRefCount
{
friend class LLSelectMgr;
+ friend class LLSafeHandle<LLObjectSelection>;
protected:
~LLObjectSelection();
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 2a126c9f01..325d523992 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -2456,7 +2456,6 @@ void sanitize_corners(const LLVector3d &corner1,
void LLViewerParcelMgr::cleanupGlobals()
{
- LLParcelSelection::sNullSelection = NULL;
}
LLViewerTexture* LLViewerParcelMgr::getBlockedImage() const