summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2017-02-23 16:49:49 -0500
committerNat Goodspeed <nat@lindenlab.com>2017-02-23 16:49:49 -0500
commitae0b3149badf369eb2b1f10aba830eef8b4af9b4 (patch)
tree8ce8316e88f684a40879fa43cea3f37f7f16aaac /indra/newview
parent80a878a79289ba2245ad35e5ae67a0034d0271e3 (diff)
DRTVWR-418: Fix a round of compile errors surfaced by -std=c++11.
These are mostly things that were in fact erroneous, but accepted by older compilers. This changeset has not yet been built with Visual Studio 2013 or Linux gcc, even with -std=c++11. This changeset has not been built *without* -std=c++11. It should be used in conjunction with a corresponding change to LL_BUILD_DARWIN_BASE_SWITCHES in viewer-build-variables/variables. This is a work in progress. We do not assert that this changeset completes the work needed to turn on -std=c++11, even on the Mac.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappdelegate-objc.mm2
-rw-r--r--indra/newview/llappviewermacosx.cpp3
-rw-r--r--indra/newview/llpanelexperiencelisteditor.cpp9
-rw-r--r--indra/newview/llpresetsmanager.cpp3
-rw-r--r--indra/newview/llviewerstats.cpp3
5 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index 8188c6c3f9..aebae4c434 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -97,7 +97,7 @@
callWindowUnhide();
}
-- (NSApplicationDelegateReply) applicationShouldTerminate:(NSApplication *)sender
+- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *)sender
{
// run one frame to assess state
if (!pumpMainLoop())
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index bb3bcf2886..d472f8926b 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -302,7 +302,8 @@ void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze)
std::string appname = gDirUtilp->getExecutableFilename();
std::string str[] = { "-pid", pid_str.str(), "-dumpdir", logdir, "-procname", appname.c_str() };
std::vector< std::string > args( str, str + ( sizeof ( str ) / sizeof ( std::string ) ) );
- LL_WARNS() << "about to launch mac-crash-logger" << pid_str << " " << logdir << " " << appname << LL_ENDL;
+ LL_WARNS() << "about to launch mac-crash-logger" << pid_str.str()
+ << " " << logdir << " " << appname << LL_ENDL;
launchApplication(&command_str, &args);
}
diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp
index 32ec4930ab..0fdb9a57f3 100644
--- a/indra/newview/llpanelexperiencelisteditor.cpp
+++ b/indra/newview/llpanelexperiencelisteditor.cpp
@@ -39,6 +39,8 @@
#include "llagent.h"
#include "lltextbox.h"
#include "lltrans.h"
+#include "llsdutil.h"
+#include <boost/foreach.hpp>
static LLPanelInjector<LLPanelExperienceListEditor> t_panel_experience_list_editor("panel_experience_list_editor");
@@ -94,7 +96,12 @@ void LLPanelExperienceListEditor::addExperienceIds( const uuid_vec_t& experience
void LLPanelExperienceListEditor::setExperienceIds( const LLSD& experience_ids )
{
mExperienceIds.clear();
- mExperienceIds.insert(experience_ids.beginArray(), experience_ids.endArray());
+ BOOST_FOREACH(LLSD uuid, llsd::inArray(experience_ids))
+ {
+ // Using insert(range) doesn't work here because the conversion from
+ // LLSD to LLUUID is ambiguous: have to specify asUUID() for each entry.
+ mExperienceIds.insert(uuid.asUUID());
+ }
onItems();
}
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index f40b3e0295..214d221716 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -165,8 +165,7 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n
}
else if(PRESETS_CAMERA == subdirectory)
{
- name_list = boost::assign::list_of
- ("Placeholder");
+ name_list = {"Placeholder"};
}
else
{
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index f52c82dab7..e918c7352c 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -307,7 +307,8 @@ U32Bytes gTotalWorldData,
U32 gSimPingCount = 0;
U32Bits gObjectData;
F32Milliseconds gAvgSimPing(0.f);
-U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {U32Bytes(0)};
+// rely on default initialization
+U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY];
extern U32 gVisCompared;
extern U32 gVisTested;