From dc106c5442ff6e57003d895bbfc38c4ada448701 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sun, 20 Jan 2013 17:10:38 -0600 Subject: [PATCH] Fix some compiler warnings/errors. Error in llinventorymodelbackgroundfetch was introduced by partial commit. --- indra/llappearance/lltexturemanagerbridge.h | 1 + indra/llappearance/llwearabletype.h | 1 + indra/llcommon/llfile.cpp | 2 +- indra/llcommon/llfile.h | 2 +- indra/newview/llinventorymodelbackgroundfetch.cpp | 3 ++- indra/newview/rlvhelper.h | 2 ++ 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/indra/llappearance/lltexturemanagerbridge.h b/indra/llappearance/lltexturemanagerbridge.h index 4b814b522..355bcf02b 100644 --- a/indra/llappearance/lltexturemanagerbridge.h +++ b/indra/llappearance/lltexturemanagerbridge.h @@ -35,6 +35,7 @@ class LLTextureManagerBridge { public: + virtual ~LLTextureManagerBridge(){}; virtual LLPointer getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE) = 0; virtual LLPointer getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) = 0; virtual LLGLTexture* getFetchedTexture(const LLUUID &image_id) = 0; diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h index e51e6731d..8d34f0025 100644 --- a/indra/llappearance/llwearabletype.h +++ b/indra/llappearance/llwearabletype.h @@ -35,6 +35,7 @@ class LLTranslationBridge { public: + virtual ~LLTranslationBridge(){}; virtual std::string getString(const std::string &xml_desc) = 0; }; diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index bc615ed39..e0e9d3a27 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -776,7 +776,7 @@ std::streamsize llstdio_filebuf::xsgetn(char_type* __s, std::streamsize __n) return __ret; } -std::streamsize llstdio_filebuf::xsputn(char_type* __s, std::streamsize __n) +std::streamsize llstdio_filebuf::xsputn(char_type const* __s, std::streamsize __n) { // Optimization in the always_noconv() case, to be generalized in the // future: when __n is sufficiently large we write directly instead of diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h index 9d70db96e..6d2bb8f13 100644 --- a/indra/llcommon/llfile.h +++ b/indra/llcommon/llfile.h @@ -186,7 +186,7 @@ protected: /*virtual*/ int sync(); std::streamsize xsgetn(char_type*, std::streamsize); - std::streamsize xsputn(char_type*, std::streamsize); + std::streamsize xsputn(char_type const*, std::streamsize); #endif }; diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 7c308de3e..2e7403b18 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -187,7 +187,8 @@ void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *) void LLInventoryModelBackgroundFetch::backgroundFetch() { - if (mBackgroundFetchActive && gAgent.getRegion() && gAgent.getRegion()->capabilitiesReceived()) + LLViewerRegion* region = gAgent.getRegion(); + if (mBackgroundFetchActive && region && region->capabilitiesReceived()) { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. std::string url = region->getCapability("FetchInventory2"); diff --git a/indra/newview/rlvhelper.h b/indra/newview/rlvhelper.h index 9b9179505..390f98edc 100644 --- a/indra/newview/rlvhelper.h +++ b/indra/newview/rlvhelper.h @@ -26,6 +26,8 @@ #include "rlvdefines.h" #include "rlvcommon.h" +class LLViewerWearable; + // ============================================================================ // RlvCommand //