diff options
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/linden_common.h | 23 | ||||
-rw-r--r-- | indra/llcommon/llavatarname.cpp | 5 | ||||
-rw-r--r-- | indra/llcommon/llevents.cpp | 4 | ||||
-rw-r--r-- | indra/llcommon/llmd5.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/llpreprocessor.h | 3 | ||||
-rw-r--r-- | indra/llcommon/llsdserialize.cpp | 18 | ||||
-rw-r--r-- | indra/llcommon/llsdserialize_xml.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/llsdutil.h | 2 | ||||
-rw-r--r-- | indra/llcommon/llstat.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/lltimer.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/llversionviewer.h | 2 |
11 files changed, 24 insertions, 41 deletions
diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h index bdcc98e402..5cfcdab41c 100644 --- a/indra/llcommon/linden_common.h +++ b/indra/llcommon/linden_common.h @@ -52,34 +52,11 @@ #include <ctime> #include <iosfwd> -// Work around Microsoft compiler warnings in STL headers -#ifdef LL_WINDOWS -#pragma warning (disable : 4702) // unreachable code -#pragma warning (disable : 4244) // conversion from time_t to S32 -#endif // LL_WINDOWS - -// *TODO: Eliminate these, most library .cpp files don't need them. -// Add them to llviewerprecompiledheaders.h if necessary. -#include <list> -#include <map> -#include <vector> -#include <string> - -#ifdef LL_WINDOWS -// Reenable warnings we disabled above -#pragma warning (3 : 4702) // unreachable code, we like level 3, not 4 -// moved msvc warnings to llpreprocessor.h *TODO - delete this comment after merge conflicts are unlikely -brad -#endif // LL_WINDOWS - // Linden only libs in alpha-order other than stdtypes.h // *NOTE: Please keep includes here to a minimum, see above. #include "stdtypes.h" #include "lldefs.h" #include "llerror.h" -#include "llextendedstatus.h" -// Don't do this, adds 15K lines of header code to every library file. -//#include "llfasttimer.h" #include "llfile.h" -#include "llformat.h" #endif diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp index ba3dd6d6b4..3206843bf4 100644 --- a/indra/llcommon/llavatarname.cpp +++ b/indra/llcommon/llavatarname.cpp @@ -106,6 +106,11 @@ std::string LLAvatarName::getCompleteName() const std::string LLAvatarName::getLegacyName() const { + if (mLegacyFirstName.empty() && mLegacyLastName.empty()) // display names disabled? + { + return mDisplayName; + } + std::string name; name.reserve( mLegacyFirstName.size() + 1 + mLegacyLastName.size() ); name = mLegacyFirstName; diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index db1ea4792b..0855180dcd 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -430,13 +430,13 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL { // The new node isn't last. Place it between the previous node and // the successor. - newNode = (myprev + mydmi->second)/2.0; + newNode = (myprev + mydmi->second)/2.f; } else { // The new node is last. Bump myprev up to the next integer, add // 1.0 and use that. - newNode = std::ceil(myprev) + 1.0; + newNode = std::ceil(myprev) + 1.f; } // Now that newNode has a value that places it appropriately in mSignal, // connect it. diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp index 75fde8e5ba..1409c55d1c 100644 --- a/indra/llcommon/llmd5.cpp +++ b/indra/llcommon/llmd5.cpp @@ -175,7 +175,7 @@ void LLMD5::update(std::istream& stream){ while (stream.good()){ stream.read( (char*)buffer, BLOCK_LEN); /* Flawfinder: ignore */ // note that return value of read is unusable. - len=stream.gcount(); + len=(int)stream.gcount(); update(buffer, len); } diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index 31d5f3d2c7..7fdb537ab5 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -132,7 +132,7 @@ #pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual" #pragma warning( 3 : 4266 ) // 'function' : no override available for virtual member function from base 'type'; function is hidden #pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored -#pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file +//#pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file #pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation. #pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning) #pragma warning( disable : 4996 ) // warning: deprecated @@ -152,6 +152,7 @@ #pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class #pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class #pragma warning (disable : 4018) // '<' : signed/unsigned mismatch + #endif // LL_MSVC #if LL_WINDOWS diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index bf62600514..b419101b7e 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -110,7 +110,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes) if (!strncasecmp(LEGACY_NON_HEADER, hdr_buf, strlen(LEGACY_NON_HEADER))) /* Flawfinder: ignore */ { legacy_no_header = true; - inbuf = str.gcount(); + inbuf = (int)str.gcount(); } else { @@ -343,7 +343,7 @@ std::istream& LLSDParser::get( char delim) const { istr.get(s, n, delim); - if(mCheckLimits) mMaxBytesLeft -= istr.gcount(); + if(mCheckLimits) mMaxBytesLeft -= (int)istr.gcount(); return istr; } @@ -353,7 +353,7 @@ std::istream& LLSDParser::get( char delim) const { istr.get(sb, delim); - if(mCheckLimits) mMaxBytesLeft -= istr.gcount(); + if(mCheckLimits) mMaxBytesLeft -= (int)istr.gcount(); return istr; } @@ -377,7 +377,7 @@ std::istream& LLSDParser::read( std::streamsize n) const { istr.read(s, n); - if(mCheckLimits) mMaxBytesLeft -= istr.gcount(); + if(mCheckLimits) mMaxBytesLeft -= (int)istr.gcount(); return istr; } @@ -789,7 +789,7 @@ bool LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const if(len) { value.resize(len); - account(fullread(istr, (char *)&value[0], len)); + account((int)fullread(istr, (char *)&value[0], len)); } c = get(istr); // strip off the trailing double-quote data = value; @@ -1069,7 +1069,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const if(size > 0) { value.resize(size); - account(fullread(istr, (char*)&value[0], size)); + account((int)fullread(istr, (char*)&value[0], size)); } data = value; } @@ -1200,7 +1200,7 @@ bool LLSDBinaryParser::parseString( if(size) { buf.resize(size); - account(fullread(istr, &buf[0], size)); + account((int)fullread(istr, &buf[0], size)); value.assign(buf.begin(), buf.end()); } return true; @@ -1642,7 +1642,7 @@ int deserialize_string_raw( const S32 BUF_LEN = 20; char buf[BUF_LEN]; /* Flawfinder: ignore */ istr.get(buf, BUF_LEN - 1, ')'); - count += istr.gcount(); + count += (int)istr.gcount(); int c = istr.get(); c = istr.get(); count += 2; @@ -1657,7 +1657,7 @@ int deserialize_string_raw( if(len) { buf.resize(len); - count += fullread(istr, (char *)&buf[0], len); + count += (int)fullread(istr, (char *)&buf[0], len); value.assign(buf.begin(), buf.end()); } c = istr.get(); diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index be9db53906..34b3dbb99a 100644 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -464,7 +464,7 @@ S32 LLSDXMLParser::Impl::parseLines(std::istream& input, LLSD& data) } } - status = XML_ParseBuffer(mParser, num_read, false); + status = XML_ParseBuffer(mParser, (int)num_read, false); if (status == XML_STATUS_ERROR) { break; diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h index 65c7297cbf..532d3f9341 100644 --- a/indra/llcommon/llsdutil.h +++ b/indra/llcommon/llsdutil.h @@ -308,7 +308,7 @@ class LLSDParam<T> \ { \ public: \ LLSDParam(const LLSD& value): \ - _value(value.AS()) \ + _value((T)value.AS()) \ {} \ \ operator T() const { return _value; } \ diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp index b2c495d093..057257057f 100644 --- a/indra/llcommon/llstat.cpp +++ b/indra/llcommon/llstat.cpp @@ -593,7 +593,7 @@ void LLStatTime::stop() { if ( LLStatAccum::SCALE_PER_FRAME == scale ) { - return mTotalTimeInFrame; + return (F32)mTotalTimeInFrame; } else { diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 38054b636e..9ebc6de7f4 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -83,7 +83,7 @@ U32 micro_sleep(U64 us, U32 max_yields) { // max_yields is unused; just fiddle with it to avoid warnings. max_yields = 0; - ms_sleep(us / 1000); + ms_sleep((U32)(us / 1000)); return 0; } #elif LL_LINUX || LL_SOLARIS || LL_DARWIN diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index a869c74189..26ff1b5c55 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -29,7 +29,7 @@ const S32 LL_VERSION_MAJOR = 3; const S32 LL_VERSION_MINOR = 3; -const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_PATCH = 1; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; |