From 1939f27f8da7ec1bdeed6b7ebb73ddb58c85ed59 Mon Sep 17 00:00:00 2001
From: Cinder Biscuits <cinder@cinderblocks.biz>
Date: Tue, 1 Oct 2019 08:15:12 -0500
Subject: [PATCH] Prefer empty() checks to size()

---
 indra/llappearance/llavatarjointmesh.cpp      |  2 +-
 indra/llappearance/lltexlayer.cpp             |  6 ++--
 indra/llcharacter/llbvhloader.cpp             |  4 +--
 indra/llcharacter/llkeyframemotion.cpp        |  2 +-
 indra/llcommon/llcoros.cpp                    |  2 +-
 indra/llcommon/llerror.cpp                    |  2 +-
 indra/llcommon/llevent.cpp                    |  2 +-
 indra/llcommon/llinitparam.h                  |  4 +--
 indra/llcommon/llleap.cpp                     |  2 +-
 indra/llcommon/llsdserialize.cpp              |  4 +--
 indra/llcommon/llstreamtools.cpp              |  4 +--
 indra/llcommon/llstring.cpp                   |  4 +--
 indra/llcommon/llstring.h                     |  2 +-
 indra/llcommon/lluriparser.cpp                | 10 +++----
 indra/llcorehttp/_httpoprequest.cpp           |  6 ++--
 indra/llmath/llvolume.cpp                     |  8 ++---
 indra/llmessage/llsdmessagebuilder.cpp        |  2 +-
 indra/llmessage/lltemplatemessagebuilder.cpp  |  2 +-
 indra/llmessage/lluseroperation.cpp           |  2 +-
 indra/llmessage/llxfermanager.cpp             |  2 +-
 indra/llprimitive/llmodelloader.cpp           |  4 +--
 indra/llrender/llcubemap.cpp                  |  2 +-
 indra/llrender/llrendertarget.cpp             |  2 +-
 indra/llui/llaccordionctrl.cpp                |  4 +--
 indra/llui/llclipboard.cpp                    |  2 +-
 indra/llui/llflatlistview.cpp                 | 14 ++++-----
 indra/llui/llfolderview.cpp                   | 28 ++++++++---------
 indra/llui/llfolderviewitem.cpp               |  2 +-
 indra/llui/llmenugl.cpp                       |  2 +-
 indra/llui/llmultislider.cpp                  |  2 +-
 indra/llui/llscrolllistctrl.cpp               |  6 ++--
 indra/llui/llspellcheck.cpp                   |  2 +-
 indra/llui/lltexteditor.cpp                   |  4 +--
 indra/llui/lltoolbar.cpp                      |  2 +-
 indra/llui/lluictrl.cpp                       |  6 ++--
 indra/llui/llview.cpp                         |  8 ++---
 indra/llvfs/llvfs.cpp                         |  2 +-
 indra/llwindow/llwindowwin32.cpp              |  4 +--
 indra/llxml/llxmlnode.cpp                     |  2 +-
 indra/newview/llagentpilot.cpp                |  2 +-
 indra/newview/llagentwearablesfetch.cpp       |  2 +-
 indra/newview/llaoengine.cpp                  |  6 ++--
 indra/newview/llappearancemgr.cpp             | 30 +++++++++----------
 indra/newview/llappviewer.cpp                 |  2 +-
 indra/newview/llattachmentsmgr.cpp            |  6 ++--
 indra/newview/llavataractions.cpp             |  6 ++--
 indra/newview/llcallingcard.cpp               |  4 +--
 indra/newview/llchathistory.cpp               |  8 ++---
 indra/newview/llcofwearables.cpp              |  2 +-
 indra/newview/llcommandlineparser.cpp         |  2 +-
 indra/newview/llcompilequeue.cpp              |  2 +-
 indra/newview/llconversationlog.cpp           |  4 +--
 indra/newview/llconversationmodel.cpp         |  4 +--
 indra/newview/lldeferredsounds.cpp            |  2 +-
 .../lldonotdisturbnotificationstorage.cpp     |  4 +--
 indra/newview/lleasymessagesender.cpp         |  4 +--
 indra/newview/lleventnotifier.h               |  3 +-
 indra/newview/llfavoritesbar.cpp              |  2 +-
 indra/newview/llfloaterao.cpp                 |  4 +--
 indra/newview/llfloateravatarpicker.cpp       |  6 ++--
 indra/newview/llfloaterbulkpermission.cpp     |  2 +-
 indra/newview/llfloaterbulkpermission.h       |  2 +-
 .../newview/llfloaterconversationpreview.cpp  |  4 +--
 indra/newview/llfloatereditdaycycle.cpp       | 10 +++----
 indra/newview/llfloatereditsky.cpp            |  2 +-
 indra/newview/llfloatereditwater.cpp          |  2 +-
 .../newview/llfloaterenvironmentsettings.cpp  |  4 +--
 indra/newview/llfloaterexperienceprofile.cpp  |  2 +-
 indra/newview/llfloaterimcontainer.cpp        |  6 ++--
 .../newview/llfloaterimnearbychathandler.cpp  |  2 +-
 indra/newview/llfloaterimsession.cpp          |  4 +--
 indra/newview/llfloaterimsessiontab.cpp       |  2 +-
 indra/newview/llfloaterinspect.cpp            |  6 ++--
 indra/newview/llfloaterlinkreplace.cpp        |  4 +--
 indra/newview/llfloatermessagelog.cpp         |  2 +-
 indra/newview/llfloatermodelpreview.cpp       |  8 ++---
 indra/newview/llfloaterpreference.cpp         |  2 +-
 indra/newview/llfloaterregioninfo.cpp         |  8 ++---
 indra/newview/llfloatertexturepicker.cpp      |  4 +--
 indra/newview/llfloatertopobjects.cpp         |  2 +-
 indra/newview/llfloateruipreview.cpp          |  2 +-
 indra/newview/llfriendcard.cpp                |  6 ++--
 indra/newview/llgesturemgr.cpp                |  4 +--
 indra/newview/llgroupmgr.cpp                  |  8 ++---
 indra/newview/llhudnametag.cpp                |  2 +-
 indra/newview/llimview.cpp                    |  6 ++--
 indra/newview/llinventorybridge.cpp           |  6 ++--
 indra/newview/llinventoryfilter.cpp           | 12 ++++----
 indra/newview/llinventoryfunctions.cpp        |  9 +++---
 indra/newview/llinventoryitemslist.cpp        | 10 +++----
 indra/newview/llinventorymodel.cpp            | 18 +++++------
 indra/newview/llinventoryobserver.cpp         |  4 +--
 indra/newview/llinventorypanel.cpp            |  2 +-
 indra/newview/lllocationhistory.cpp           |  2 +-
 indra/newview/lllogchat.cpp                   |  4 +--
 indra/newview/lllogininstance.cpp             |  2 +-
 indra/newview/llmarketplacefunctions.h        |  2 +-
 indra/newview/llmutelist.cpp                  |  4 +--
 indra/newview/llpaneleditwearable.cpp         |  2 +-
 indra/newview/llpanelgroupbulkban.cpp         | 12 ++++----
 indra/newview/llpanelgroupinvite.cpp          |  2 +-
 indra/newview/llpanelgrouproles.cpp           |  4 +--
 indra/newview/llpanellandmarks.cpp            |  2 +-
 indra/newview/llpanellogin.cpp                |  2 +-
 indra/newview/llpanelmaininventory.cpp        |  4 +--
 indra/newview/llpanelmarketplaceinbox.cpp     |  2 +-
 indra/newview/llpaneloutfitedit.cpp           |  6 ++--
 indra/newview/llpanelpeople.cpp               |  2 +-
 indra/newview/llpanelpeoplemenus.cpp          |  4 +--
 indra/newview/llpanelprofile.cpp              |  8 ++---
 indra/newview/llpanelprofilelegacy.cpp        | 10 +++----
 indra/newview/llpanelteleporthistory.cpp      |  2 +-
 indra/newview/llpreviewnotecard.cpp           |  2 +-
 indra/newview/llpreviewscript.cpp             |  2 +-
 indra/newview/llrecentpeople.cpp              |  2 +-
 indra/newview/llscreenchannel.cpp             |  8 ++---
 indra/newview/llsearchcombobox.cpp            |  2 +-
 indra/newview/llselectmgr.cpp                 | 10 +++----
 indra/newview/llskinningutil.cpp              |  2 +-
 indra/newview/llspeakers.cpp                  | 10 +++----
 indra/newview/llsurface.cpp                   |  2 +-
 indra/newview/llteleporthistory.cpp           |  8 ++---
 indra/newview/llteleporthistorystorage.cpp    |  2 +-
 indra/newview/lltexturecache.cpp              |  2 +-
 indra/newview/lltoast.h                       |  2 +-
 indra/newview/lltoolmgr.cpp                   |  4 +--
 indra/newview/lltranslate.cpp                 |  2 +-
 indra/newview/llurlwhitelist.cpp              |  2 +-
 indra/newview/llviewerinventory.cpp           |  2 +-
 indra/newview/llviewerjointattachment.cpp     |  2 +-
 indra/newview/llviewermenu.cpp                |  2 +-
 indra/newview/llviewermessage.cpp             |  6 ++--
 indra/newview/llviewerobject.cpp              |  6 ++--
 indra/newview/llviewerobjectlist.cpp          |  4 +--
 indra/newview/llviewerregion.cpp              |  2 +-
 indra/newview/llviewerwindow.cpp              |  2 +-
 indra/newview/llvoavatar.cpp                  | 12 ++++----
 indra/newview/llvoavatarself.cpp              |  2 +-
 indra/newview/llvotree.cpp                    |  2 +-
 indra/newview/llvovolume.cpp                  |  4 +--
 indra/newview/llwlanimator.cpp                |  2 +-
 indra/newview/llworld.cpp                     |  2 +-
 indra/newview/pipeline.cpp                    |  2 +-
 143 files changed, 317 insertions(+), 315 deletions(-)

diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp
index d6ff7bee12..482feb6e13 100644
--- a/indra/llappearance/llavatarjointmesh.cpp
+++ b/indra/llappearance/llavatarjointmesh.cpp
@@ -361,7 +361,7 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
         // additional extended-skeleton joints lie between this joint
         // and the original parent.
         LLJoint *ancestor = getBaseSkeletonAncestor(current_joint);
-		if(jrd.size() && jrd.back()->mWorldMatrix == &ancestor->getWorldMatrix())
+		if(!jrd.empty() && jrd.back()->mWorldMatrix == &ancestor->getWorldMatrix())
 		{
 			// ...then just add ourselves
 			LLAvatarJoint* jointp = js.mJoint;
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index ee898006ed..16a98d9573 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -372,7 +372,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
 	BOOL success = TRUE;
 	mIsVisible = TRUE;
 
-	if (mMaskLayerList.size() > 0)
+	if (!mMaskLayerList.empty())
 	{
 		for (auto layer : mMaskLayerList)
         {
@@ -554,7 +554,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
 		}
 		gGL.flush();
 	}
-	else if (forceClear || info->mClearAlpha || (mMaskLayerList.size() > 0))
+	else if (forceClear || info->mClearAlpha || (!mMaskLayerList.empty()))
 	{
 		// Set the alpha channel to one (clean up after previous blending)
 		gGL.flush();
@@ -577,7 +577,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
 	
 	// (Optional) Mask out part of the baked texture with alpha masks
 	// will still have an effect even if mClearAlpha is set or the alpha component was replaced
-	if (mMaskLayerList.size() > 0)
+	if (!mMaskLayerList.empty())
 	{
 		gGL.setSceneBlendType(LLRender::BT_MULT_ALPHA);
 		gGL.getTexUnit(0)->setTextureBlendType( LLTexUnit::TB_REPLACE );
diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp
index fecdda6771..331ba46cab 100644
--- a/indra/llcharacter/llbvhloader.cpp
+++ b/indra/llcharacter/llbvhloader.cpp
@@ -613,7 +613,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &
 		//----------------------------------------------------------------
 		if ( strstr(line.c_str(), "}") )
 		{
-			if (parent_joints.size() > 0)
+			if (!parent_joints.empty())
 			{
 				parent_joints.pop_back();
 			}
@@ -671,7 +671,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &
 		//---------------------------------------------------------------
 		// we require the root joint be "hip" - DEV-26188
 		//---------------------------------------------------------------
-        if (mJoints.size() == 0 )
+        if (mJoints.empty())
         {
             //The root joint of the BVH file must be hip (mPelvis) or an alias of mPelvis.
             const char* FORCED_ROOT_NAME = "hip";
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index d9f46457f9..6d1f3f6cdf 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -595,7 +595,7 @@ BOOL LLKeyframeMotion::setupPose()
 		mConstraints.push_front(constraintp);
 	}
 
-	if (mJointMotionList->mConstraints.size())
+	if (!mJointMotionList->mConstraints.empty())
 	{
 		mPelvisp = mCharacter->getJoint("mPelvis");
 		if (!mPelvisp)
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
index 85cdb6894e..338edc5934 100644
--- a/indra/llcommon/llcoros.cpp
+++ b/indra/llcommon/llcoros.cpp
@@ -283,7 +283,7 @@ void LLCoros::setStackSize(S32 stacksize)
 void LLCoros::printActiveCoroutines()
 {
     LL_INFOS("LLCoros") << "Number of active coroutines: " << (S32)mCoros.size() << LL_ENDL;
-    if (mCoros.size() > 0)
+    if (!mCoros.empty())
     {
         LL_INFOS("LLCoros") << "-------------- List of active coroutines ------------";
         F64 time = LLTimer::getTotalSeconds();
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index bfa4d14e8e..19ed94e326 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -66,7 +66,7 @@ namespace {
 		{
 			// Need UTF16 for Unicode OutputDebugString
 			//
-			if (s.size())
+			if (!s.empty())
 			{
 				OutputDebugString(ll_convert_string_to_wide(s).c_str());
 				OutputDebugString(TEXT("\n"));
diff --git a/indra/llcommon/llevent.cpp b/indra/llcommon/llevent.cpp
index fc04140627..703a6b6b34 100644
--- a/indra/llcommon/llevent.cpp
+++ b/indra/llcommon/llevent.cpp
@@ -162,7 +162,7 @@ protected:
 
 LLSimpleDispatcher::~LLSimpleDispatcher()
 {
-	while (mListeners.size() > 0)
+	while (!mListeners.empty())
 	{
         LLSimpleDispatcher::removeListener(mListeners.begin()->listener);
 	}
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h
index 5976fbf8a3..9162567622 100644
--- a/indra/llcommon/llinitparam.h
+++ b/indra/llcommon/llinitparam.h
@@ -1094,8 +1094,8 @@ namespace LLInitParam
 				if (!serialized) 
 				{
 					std::string calculated_key = typed_param.calcValueName(typed_param.getValue());
-					if (calculated_key.size() 
-						&& (!diff_typed_param 
+					if (!calculated_key.empty()
+                        && (!diff_typed_param 
 							|| !ParamCompare<std::string>::equals(static_cast<const self_t*>(diff_param)->getValueName(), calculated_key)))
 					{
 						serialized = parser.writeValue(calculated_key, name_stack);
diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp
index 840cd8446a..113042be66 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -78,7 +78,7 @@ public:
             // notice Python specially: we provide Python LLSD serialization
             // support, so there's a pretty good reason to implement plugins
             // in that language.
-            if (cparams.args.size() && (desclower == "python" || desclower == "python.exe"))
+            if (!cparams.args.empty() && (desclower == "python" || desclower == "python.exe"))
             {
                 mDesc = LLProcess::basename(cparams.args()[0]);
             }
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 4934852e75..fea1d4907f 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -1392,7 +1392,7 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
 		// *FIX: memory inefficient.
 		const std::vector<U8>& buffer = data.asBinary();
 		ostr << "b(" << buffer.size() << ")\"";
-		if(buffer.size())
+		if(!buffer.empty())
 		{
 			if (options & LLSDFormatter::OPTIONS_PRETTY_BINARY)
 			{
@@ -1529,7 +1529,7 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
 		const std::vector<U8>& buffer = data.asBinary();
 		U32 size_nbo = htonl(buffer.size());
 		ostr.write((const char*)(&size_nbo), sizeof(U32));
-		if(buffer.size()) ostr.write((const char*)&buffer[0], buffer.size());
+		if(!buffer.empty()) ostr.write((const char*)&buffer[0], buffer.size());
 		break;
 	}
 
diff --git a/indra/llcommon/llstreamtools.cpp b/indra/llcommon/llstreamtools.cpp
index 969fed6702..c2fd015f0f 100644
--- a/indra/llcommon/llstreamtools.cpp
+++ b/indra/llcommon/llstreamtools.cpp
@@ -452,8 +452,8 @@ void get_keyword_and_value(std::string& keyword,
 
 	// get the value
 	value.clear();
-	if (keyword.size() > 0
-		&& '\r' != line[line_index]
+	if (!keyword.empty()
+        && '\r' != line[line_index]
 		&& '\n' != line[line_index])
 
 	{
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index ba53c4ca53..c1f7898eb2 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -1413,7 +1413,7 @@ S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions)
 		bool found_replacement = false;
 		std::string replacement;
 
-		if (tokens.size() == 0)
+		if (tokens.empty())
 		{
 			found_replacement = false;
 		}
@@ -1491,7 +1491,7 @@ S32 LLStringUtil::format(std::string& s, const LLSD& substitutions)
 		bool found_replacement = false;
 		std::string replacement;
 
-		if (tokens.size() == 0)
+		if (tokens.empty())
 		{
 			found_replacement = false;
 		}
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 1b414ad2bd..625a30231e 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -1391,7 +1391,7 @@ S32 LLStringUtilBase<T>::compareDictInsensitive(const string_type& astr, const s
 template<class T> 
 BOOL LLStringUtilBase<T>::precedesDict( const string_type& a, const string_type& b )
 {
-	if( a.size() && b.size() )
+	if(!a.empty() && !b.empty())
 	{
 		return (LLStringUtilBase<T>::compareDict(a, b) < 0);
 	}
diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp
index 9cd03594f5..7acc07b053 100644
--- a/indra/llcommon/lluriparser.cpp
+++ b/indra/llcommon/lluriparser.cpp
@@ -65,7 +65,7 @@ const char * LLUriParser::scheme() const
 
 void LLUriParser::scheme(const std::string& s)
 {
-	mTmpScheme = !s.size();
+	mTmpScheme = s.empty();
 	mScheme = s;
 }
 
@@ -210,7 +210,7 @@ void LLUriParser::glue(std::string& uri) const
 
 void LLUriParser::glueFirst(std::string& uri, bool use_scheme) const
 {
-	if (use_scheme && mScheme.size())
+	if (use_scheme && !mScheme.empty())
 	{
 		uri = mScheme;
 		uri += "://";
@@ -225,7 +225,7 @@ void LLUriParser::glueFirst(std::string& uri, bool use_scheme) const
 
 void LLUriParser::glueSecond(std::string& uri) const
 {
-	if (mPort.size())
+	if (!mPort.empty())
 	{
 		uri = ':';
 		uri += mPort;
@@ -237,13 +237,13 @@ void LLUriParser::glueSecond(std::string& uri) const
 
 	uri += mPath;
 
-	if (mQuery.size())
+	if (!mQuery.empty())
 	{
 		uri += '?';
 		uri += mQuery;
 	}
 
-	if (mFragment.size())
+	if (!mFragment.empty())
 	{
 		uri += '#';
 		uri += mFragment;
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index c64f9ad2d7..c73d20a6e7 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -583,18 +583,18 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
 		}
 
 	}
-	else if (gpolicy.mHttpProxy.size())
+	else if (!gpolicy.mHttpProxy.empty())
 	{
 		// *TODO:  This is fine for now but get fuller socks5/
 		// authentication thing going later....
 		check_curl_easy_setopt(mCurlHandle, CURLOPT_PROXY, gpolicy.mHttpProxy.c_str());
 		check_curl_easy_setopt(mCurlHandle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
 	}
-	if (gpolicy.mCAPath.size())
+	if (!gpolicy.mCAPath.empty())
 	{
 		check_curl_easy_setopt(mCurlHandle, CURLOPT_CAPATH, gpolicy.mCAPath.c_str());
 	}
-	if (gpolicy.mCAFile.size())
+	if (!gpolicy.mCAFile.empty())
 	{
 		check_curl_easy_setopt(mCurlHandle, CURLOPT_CAINFO, gpolicy.mCAFile.c_str());
 	}
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 5e896d14e3..1309242a69 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -592,9 +592,9 @@ void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F3
 		// Iterate through all the integer steps of t.
 		pt1.set(cos(ang)*scale,sin(ang)*scale,t);
 
-		if (mProfile.size() > 0) {
+		if (!mProfile.empty()) {
 			LLVector4a p = mProfile[mProfile.size()-1];
-			for (S32 i = 0; i < split && mProfile.size() > 0; i++) {
+			for (S32 i = 0; i < split && !mProfile.empty(); i++) {
 				//mProfile.push_back(p+(pt1-p) * 1.0f/(float)(split+1) * (float)(i+1));
 				LLVector4a new_pt;
 				new_pt.setSub(pt1, p);
@@ -620,9 +620,9 @@ void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F3
 		LLVector4a new_pt;
 		new_pt.setLerp(pt1, pt2, t_fraction);
 		
-		if (mProfile.size() > 0) {
+		if (!mProfile.empty()) {
 			LLVector4a p = mProfile[mProfile.size()-1];
-			for (S32 i = 0; i < split && mProfile.size() > 0; i++) {
+			for (S32 i = 0; i < split && !mProfile.empty(); i++) {
 				//mProfile.push_back(p+(new_pt-p) * 1.0f/(float)(split+1) * (float)(i+1));
 
 				LLVector4a pt1;
diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp
index 823ee655ee..5cfe71eb61 100644
--- a/indra/llmessage/llsdmessagebuilder.cpp
+++ b/indra/llmessage/llsdmessagebuilder.cpp
@@ -182,7 +182,7 @@ void LLSDMessageBuilder::addString(const char* varname, const char* v)
 
 void LLSDMessageBuilder::addString(const char* varname, const std::string& v)
 {
-	if (v.size())
+	if (!v.empty())
 		(*mCurrentBlock)[varname] = v; 
 	else
 		(*mCurrentBlock)[varname] = ""; 
diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp
index 6e51d99167..4414deddac 100644
--- a/indra/llmessage/lltemplatemessagebuilder.cpp
+++ b/indra/llmessage/lltemplatemessagebuilder.cpp
@@ -457,7 +457,7 @@ void LLTemplateMessageBuilder::addString(const char* varname, const char* s)
 
 void LLTemplateMessageBuilder::addString(const char* varname, const std::string& s)
 {
-	if (s.size())
+	if (!s.empty())
 		addData( varname, (void *)s.c_str(), MVT_VARIABLE, (S32)(s.size()) + 1); 
 	else
 		addData( varname, nullptr, MVT_VARIABLE, 0); 
diff --git a/indra/llmessage/lluseroperation.cpp b/indra/llmessage/lluseroperation.cpp
index f03a22fa08..be5b012f52 100644
--- a/indra/llmessage/lluseroperation.cpp
+++ b/indra/llmessage/lluseroperation.cpp
@@ -98,7 +98,7 @@ LLUserOperationMgr::LLUserOperationMgr()
 
 LLUserOperationMgr::~LLUserOperationMgr()
 {
-	if (mUserOperationList.size() > 0)
+	if (!mUserOperationList.empty())
 	{
 		LL_WARNS() << "Exiting with user operations pending." << LL_ENDL;
 	}
diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp
index 46b7685f47..0e9c980707 100644
--- a/indra/llmessage/llxfermanager.cpp
+++ b/indra/llmessage/llxfermanager.cpp
@@ -1137,7 +1137,7 @@ void LLXferManager::retransmitUnackedPackets()
 	// so we don't blow through bandwidth.
 	//
 
-	while (mXferAckQueue.size())
+	while (!mXferAckQueue.empty())
 	{
 		if (mAckThrottle.checkOverflow(1000.0f*8.0f))
 		{
diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp
index f2fe2d6f16..7c02fb823a 100644
--- a/indra/llprimitive/llmodelloader.cpp
+++ b/indra/llprimitive/llmodelloader.cpp
@@ -287,7 +287,7 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
 			{
 				if (idx >= model[lod].size())
 				{
-					if (model[lod].size())
+					if (!model[lod].empty())
 					{
 						instance_list[i].mLOD[lod] = model[lod][0];
 					}
@@ -419,7 +419,7 @@ void LLModelLoader::critiqueRigForUploadApplicability( const std::vector<std::st
 bool LLModelLoader::isRigLegacy( const std::vector<std::string> &jointListFromAsset )
 {
 	//No joints in asset
-	if ( jointListFromAsset.size() == 0 )
+	if (jointListFromAsset.empty())
 	{
 		return false;
 	}
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp
index 7afee28d0d..e82b05f562 100644
--- a/indra/llrender/llcubemap.cpp
+++ b/indra/llrender/llcubemap.cpp
@@ -79,7 +79,7 @@ void LLCubeMap::initGL()
 			
 			LLImageGL::generateTextures(1, &texname);
 
-			for (int i = 0; i < 6; i++)
+			for (auto i = 0; i < 6; ++i)
 			{
 				mImages[i] = new LLImageGL(64, 64, 4, (use_cube_mipmaps? TRUE : FALSE));
 				mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP);
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index f7e0511bfb..7fbbec5fc8 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -393,7 +393,7 @@ void LLRenderTarget::release()
 		mFBO = 0;
 	}
 
-	if (mTex.size() > 0)
+	if (!mTex.empty())
 	{
 		sBytesAllocated -= mResX*mResY*4*mTex.size();
 		LLImageGL::deleteTextures(mTex.size(), &mTex[0]);
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 9ebd1a55e1..6a127e0ee8 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -509,7 +509,7 @@ void LLAccordionCtrl::arrange()
 {
 	updateNoTabsHelpTextVisibility();
 
-	if( mAccordionTabs.size() == 0)
+	if(mAccordionTabs.empty())
 	{
 		//We do not arrange if we do not have what should be arranged
 		return;
@@ -800,7 +800,7 @@ void	LLAccordionCtrl::reset		()
 
 void LLAccordionCtrl::expandDefaultTab()
 {
-	if (mAccordionTabs.size() > 0)
+	if (!mAccordionTabs.empty())
 	{
 		LLAccordionCtrlTab* tab = mAccordionTabs.front();
 
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index d04d3b6650..60eb3f3eea 100644
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -104,7 +104,7 @@ bool LLClipboard::pasteFromClipboard(std::vector<LLUUID>& inv_objects) const
 // Returns true if the LL Clipboard has pasteable items in it
 bool LLClipboard::hasContents() const
 {
-	return (mObjects.size() > 0);
+	return (!mObjects.empty());
 }
 
 // Returns true if the input uuid is in the list of clipboard objects
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 774561bb6b..044e9686fa 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -112,7 +112,7 @@ bool LLFlatListView::addItemPairs(pairs_list_t panel_list, bool rearrange /*= tr
         LL_WARNS_ONCE() << "No comparator specified for inserting FlatListView items." << LL_ENDL;
         return false;
     }
-    if (panel_list.size() == 0)
+    if (panel_list.empty())
     {
         return false;
     }
@@ -711,7 +711,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
 	{
 		case KEY_RETURN:
 		{
-			if (mSelectedItemPairs.size() && mask == MASK_NONE)
+			if (!mSelectedItemPairs.empty() && mask == MASK_NONE)
 			{
 				mOnReturnSignal(this, getValue());
 				handled = TRUE;
@@ -750,7 +750,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
 			break;
 	}
 
-	if ( ( key == KEY_UP || key == KEY_DOWN ) && mSelectedItemPairs.size() )
+	if ( ( key == KEY_UP || key == KEY_DOWN ) && !mSelectedItemPairs.empty())
 	{
 		ensureSelectedVisible();
 		/*
@@ -861,7 +861,7 @@ bool LLFlatListView::selectItemPair(item_pair_t* item_pair, bool select)
 
 void LLFlatListView::scrollToShowFirstSelectedItem()
 {
-	if (!mSelectedItemPairs.size())	return;
+	if (mSelectedItemPairs.empty())	return;
 
 	LLRect selected_rc = mSelectedItemPairs.front()->first->getRect();
 
@@ -873,7 +873,7 @@ void LLFlatListView::scrollToShowFirstSelectedItem()
 
 LLRect LLFlatListView::getLastSelectedItemRect()
 {
-	if (!mSelectedItemPairs.size())
+	if (mSelectedItemPairs.empty())
 	{
 		return LLRect::null;
 	}
@@ -941,7 +941,7 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti
 	if (!mIsConsecutiveSelection)
 	{
 		// Leave only one item selected if list has not consecutive selection
-		if (mSelectedItemPairs.size() && !reset_selection)
+		if (!mSelectedItemPairs.empty() && !reset_selection)
 		{
 			item_pair_t* cur_sel_pair = mSelectedItemPairs.back();
 			resetSelection();
@@ -949,7 +949,7 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti
 		}
 	}
 
-	if ( mSelectedItemPairs.size() )
+	if (!mSelectedItemPairs.empty())
 	{
 		item_pair_t* to_sel_pair = nullptr;
 		item_pair_t* cur_sel_pair = nullptr;
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 9eb2e7f50c..de2ac5f3a0 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -381,7 +381,7 @@ void LLFolderView::addToSelectionList(LLFolderViewItem* item)
 	{
 		removeFromSelectionList(item);
 	}
-	if (mSelectedItems.size())
+	if (!mSelectedItems.empty())
 	{
 		mSelectedItems.back()->setIsCurSelection(FALSE);
 	}
@@ -391,7 +391,7 @@ void LLFolderView::addToSelectionList(LLFolderViewItem* item)
 
 void LLFolderView::removeFromSelectionList(LLFolderViewItem* item)
 {
-	if (mSelectedItems.size())
+	if (!mSelectedItems.empty())
 	{
 		mSelectedItems.back()->setIsCurSelection(FALSE);
 	}
@@ -408,7 +408,7 @@ void LLFolderView::removeFromSelectionList(LLFolderViewItem* item)
 			++item_iter;
 		}
 	}
-	if (mSelectedItems.size())
+	if (!mSelectedItems.empty())
 	{
 		mSelectedItems.back()->setIsCurSelection(TRUE);
 	}
@@ -416,7 +416,7 @@ void LLFolderView::removeFromSelectionList(LLFolderViewItem* item)
 
 LLFolderViewItem* LLFolderView::getCurSelectedItem( void )
 {
-	if(mSelectedItems.size())
+	if(!mSelectedItems.empty())
 	{
 		LLFolderViewItem* itemp = mSelectedItems.back();
 		llassert(itemp->getIsCurSelection());
@@ -669,7 +669,7 @@ void LLFolderView::draw()
 	}
 
 	static LLUICachedControl<F32> type_ahead_timeout("TypeAheadTimeout", 0);
-	if (mSearchTimer.getElapsedTimeF32() > type_ahead_timeout || !mSearchString.size())
+	if (mSearchTimer.getElapsedTimeF32() > type_ahead_timeout || mSearchString.empty())
 	{
 		mSearchString.clear();
 	}
@@ -891,7 +891,7 @@ BOOL LLFolderView::autoOpenTest(LLFolderViewFolder* folder)
 
 BOOL LLFolderView::canCopy() const
 {
-	if (!(getVisible() && getEnabled() && (mSelectedItems.size() > 0)))
+	if (!(getVisible() && getEnabled() && (!mSelectedItems.empty())))
 	{
 		return FALSE;
 	}
@@ -931,7 +931,7 @@ void LLFolderView::copy()
 
 BOOL LLFolderView::canCut() const
 {
-	if (!(getVisible() && getEnabled() && (mSelectedItems.size() > 0)))
+	if (!(getVisible() && getEnabled() && (!mSelectedItems.empty())))
 	{
 		return FALSE;
 	}
@@ -953,7 +953,7 @@ void LLFolderView::cut()
 {
 	// clear the inventory clipboard
 	LLClipboard::instance().reset();
-	if(getVisible() && getEnabled() && (mSelectedItems.size() > 0))
+	if(getVisible() && getEnabled() && (!mSelectedItems.empty()))
 	{
 		// Find out which item will be selected once the selection will be cut
 		LLFolderViewItem* item_to_select = getNextUnselectedItem();
@@ -1161,7 +1161,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
 		break;
 
 	case KEY_DOWN:
-		if((mSelectedItems.size() > 0) && mScrollContainer)
+		if((!mSelectedItems.empty()) && mScrollContainer)
 		{
 			LLFolderViewItem* last_selected = getCurSelectedItem();
 			BOOL shift_select = mask & MASK_SHIFT;
@@ -1224,7 +1224,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
 		break;
 
 	case KEY_UP:
-		if((mSelectedItems.size() > 0) && mScrollContainer)
+		if((!mSelectedItems.empty()) && mScrollContainer)
 		{
 			LLFolderViewItem* last_selected = mSelectedItems.back();
 			BOOL shift_select = mask & MASK_SHIFT;
@@ -1279,7 +1279,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
 		break;
 
 	case KEY_RIGHT:
-		if(mSelectedItems.size())
+		if(!mSelectedItems.empty())
 		{
 			LLFolderViewItem* last_selected = getCurSelectedItem();
 			last_selected->setOpen( TRUE );
@@ -1289,7 +1289,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
 		break;
 
 	case KEY_LEFT:
-		if(mSelectedItems.size())
+		if(!mSelectedItems.empty())
 		{
 			LLFolderViewItem* last_selected = getCurSelectedItem();
 			LLFolderViewItem* parent_folder = last_selected->getParentFolder();
@@ -1552,7 +1552,7 @@ void LLFolderView::deleteAllChildren()
 
 void LLFolderView::scrollToShowSelection()
 {
-	if ( mSelectedItems.size() )
+	if (!mSelectedItems.empty())
 	{
 		mNeedsScroll = TRUE;
 	}
@@ -1777,7 +1777,7 @@ void LLFolderView::update()
 		constraint_rect.setOriginAndSize(0, 0, content_rect.getWidth(), content_rect.getHeight());
 	}
 
-	if (mSelectedItems.size() && mNeedsScroll)
+	if (!mSelectedItems.empty() && mNeedsScroll)
 	{
 		scrollToShowItem(mSelectedItems.back(), constraint_rect);
 		// continue scrolling until animated layout change is done
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 88aeac3e6b..a1ec741ebb 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -1307,7 +1307,7 @@ LLFolderViewFolder* LLFolderViewFolder::getCommonAncestor(LLFolderViewItem* item
 		item_b_ancestors.pop_front();
 	}
 
-	while(item_a_ancestors.size())
+	while(!item_a_ancestors.empty())
 	{
 		common_ancestor = item_a_ancestors.front();
 
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 3f1f19aba1..b187ac4dbc 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -2068,7 +2068,7 @@ void LLMenuGL::arrange( void )
 
 	cleanupSpilloverBranch();
 
-	if( mItems.size() ) 
+	if(!mItems.empty()) 
 	{
 		const LLRect menu_region_rect = LLMenuGL::sMenuContainer ? LLMenuGL::sMenuContainer->getMenuRect() : LLRect(0, S32_MAX, S32_MAX, 0);
 
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index e77889a8b0..b6be4eba6c 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -332,7 +332,7 @@ void LLMultiSlider::deleteSlider(const std::string& name)
 
 void LLMultiSlider::clear()
 {
-	while(mThumbRects.size() > 0) {
+	while(!mThumbRects.empty()) {
 		deleteCurSlider();
 	}
 
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index ff75d17238..c928920b4e 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -461,7 +461,7 @@ S32 LLScrollListCtrl::getFirstSelectedIndex() const
 
 LLScrollListItem* LLScrollListCtrl::getFirstData() const
 {
-	if (mItemList.size() == 0)
+	if (mItemList.empty())
 	{
 		return NULL;
 	}
@@ -470,7 +470,7 @@ LLScrollListItem* LLScrollListCtrl::getFirstData() const
 
 LLScrollListItem* LLScrollListCtrl::getLastData() const
 {
-	if (mItemList.size() == 0)
+	if (mItemList.empty())
 	{
 		return NULL;
 	}
@@ -2293,7 +2293,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
 				break;
 			case KEY_BACKSPACE:
 				mSearchTimer.reset();
-				if (mSearchString.size())
+				if (!mSearchString.empty())
 				{
 					mSearchString.erase(mSearchString.size() - 1, 1);
 				}
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 85b3dbcb72..dd8b7a3326 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -70,7 +70,7 @@ bool LLSpellChecker::checkSpelling(const std::string& word) const
 	{
 		return true;
 	}
-	if (mIgnoreList.size() > 0)
+	if (!mIgnoreList.empty())
 	{
 		std::string word_lower(word);
 		LLStringUtil::toLower(word_lower);
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index d330252d9a..d0e75a6a12 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1876,7 +1876,7 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask )
 			LLToolTipMgr::instance().getToolTipMessage(message);
 			LLWString tool_tip_text(utf8str_to_wstring(message));
 
-			if (tool_tip_text.size() > 0)
+			if (!tool_tip_text.empty())
 			{
 				// Delete any selected characters (the tooltip text replaces them)
 				if(hasSelection())
@@ -2053,7 +2053,7 @@ void LLTextEditor::undo()
 
 BOOL LLTextEditor::canRedo() const
 {
-	return !mReadOnly && (mUndoStack.size() > 0) && (mLastCmd != mUndoStack.front());
+	return !mReadOnly && (!mUndoStack.empty()) && (mLastCmd != mUndoStack.front());
 }
 
 void LLTextEditor::redo()
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 26876ef282..9e21df43fa 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -789,7 +789,7 @@ void LLToolBar::updateLayoutAsNeeded()
 	switch (mLayoutType)
 	{
 		case LLToolBarEnums::LAYOUT_FILL:
-			if (mButtons.size())
+			if (!mButtons.empty())
 			{
 				equalized_width = (max_length - mPadBetween * (mButtons.size() + 1)) / mButtons.size();
 			}
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 07f2ce3e0e..159b003973 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -739,7 +739,7 @@ BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
 	// try to select default tab group child
 	LLViewQuery query = getTabOrderQuery();
 	child_list_t result = query(this);
-	if(result.size() > 0)
+	if(!result.empty())
 	{
 		LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back());
 		if(!ctrl->hasFocus())
@@ -759,7 +759,7 @@ BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
 		LLViewQuery query = getTabOrderQuery();
 		query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
 		child_list_t result = query(this);
-		if(result.size() > 0)
+		if(!result.empty())
 		{
 			LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back());
 			if(!ctrl->hasFocus())
@@ -776,7 +776,7 @@ BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
 	}
 	// no text field found, or we don't care about text fields
 	result = getTabOrderQuery().run(this);
-	if(result.size() > 0)
+	if(!result.empty())
 	{
 		LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back());
 		if(!ctrl->hasFocus())
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index bd91dacd57..daf1b23a89 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1316,8 +1316,8 @@ void LLView::drawDebugRect()
 
 		// Draw the name if it's not a leaf node or not in editing or preview mode
 		if (sDebugRectsShowNames 
-			&& mChildList.size()
-			&& preview_iter == sPreviewHighlightedElements.end())
+			&& !mChildList.empty()
+            && preview_iter == sPreviewHighlightedElements.end())
 		{
 			S32 x, y;
 			gGL.color4fv( border_color.mV );
@@ -1989,7 +1989,7 @@ class SortByTabOrder : public LLQuerySorter, public LLSingleton<SortByTabOrder>
 const LLViewQuery & LLView::getTabOrderQuery()
 {
 	static LLViewQuery query;
-	if(query.getPreFilters().size() == 0) {
+	if(query.getPreFilters().empty()) {
 		query.addPreFilter(LLVisibleFilter::getInstance());
 		query.addPreFilter(LLEnabledFilter::getInstance());
 		query.addPreFilter(LLTabStopFilter::getInstance());
@@ -2013,7 +2013,7 @@ class LLFocusRootsFilter : public LLQueryFilter, public LLSingleton<LLFocusRoots
 const LLViewQuery & LLView::getFocusRootsQuery()
 {
 	static LLViewQuery query;
-	if(query.getPreFilters().size() == 0) {
+	if(query.getPreFilters().empty()) {
 		query.addPreFilter(LLVisibleFilter::getInstance());
 		query.addPreFilter(LLEnabledFilter::getInstance());
 		query.addPreFilter(LLFocusRootsFilter::getInstance());
diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp
index 50ea17f37a..f476d3448c 100644
--- a/indra/llvfs/llvfs.cpp
+++ b/indra/llvfs/llvfs.cpp
@@ -1578,7 +1578,7 @@ LLVFSBlock *LLVFS::findFreeBlock(S32 size, LLVFSFileBlock *immune)
 				have_lru_list = TRUE;
 			}
 
-			if (lru_list.size() == 0)
+			if (lru_list.empty())
 			{
 				// No more files to delete, and still not enough room!
 				LL_WARNS() << "VFS: Can't make " << size << " bytes of free space in VFS, giving up" << LL_ENDL;
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 7a45fa0ef3..1e7903c7f6 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -3923,11 +3923,11 @@ void LLWindowWin32::handleCompositionMessage(const U32 indexes)
 		}
 		else
 		{
-			if (preedit_segment_lengths.size() == 0)
+			if (preedit_segment_lengths.empty())
 			{
 				preedit_segment_lengths.assign(1, preedit_string.length());
 			}
-			if (preedit_standouts.size() == 0)
+			if (preedit_standouts.empty())
 			{
 				preedit_standouts.assign(preedit_segment_lengths.size(), FALSE);
 			}
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index ad6b4c24c0..6394a1164f 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -1196,7 +1196,7 @@ void LLXMLNode::getChildren(const LLStringTableEntry* name, LLXMLNodeList &child
 			}
 		}
 	}
-	if (children.size() == 0 && use_default_if_missing && !mDefault.isNull())
+	if (children.empty() && use_default_if_missing && !mDefault.isNull())
 	{
 		mDefault->getChildren(name, children, FALSE);
 	}
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index a71b34c5c1..2d8a869ff0 100644
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
@@ -256,7 +256,7 @@ void LLAgentPilot::startPlayback()
 		mCurrentAction = 0;
 		mTimer.reset();
 
-		if (mActions.size())
+		if (!mActions.empty())
 		{
 			LL_INFOS() << "Starting playback, moving to waypoint 0" << LL_ENDL;
 			gAgent.startAutoPilotGlobal(mActions[0].mTarget);
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index ef42d7bc80..7493eb24ac 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -82,7 +82,7 @@ void LLInitialWearablesFetch::processContents()
 	LLInventoryModel::cat_array_t cat_array;
 	LLInventoryModel::item_array_t wearable_array;
 	LLFindWearables is_wearable;
-	llassert_always(mComplete.size() != 0);
+	llassert_always(!mComplete.empty());
 	gInventory.collectDescendentsIf(mComplete.front(), cat_array, wearable_array, 
 									LLInventoryModel::EXCLUDE_TRASH, is_wearable);
 
diff --git a/indra/newview/llaoengine.cpp b/indra/newview/llaoengine.cpp
index 168379c617..3695102649 100644
--- a/indra/newview/llaoengine.cpp
+++ b/indra/newview/llaoengine.cpp
@@ -641,7 +641,7 @@ void LLAOEngine::cycle(eCycleMode cycleMode)
 		return;
 	}
 
-	if (!state->mAnimations.size())
+	if (state->mAnimations.empty())
 	{
 		LL_DEBUGS("AOEngine") << "cycle without animations in state." << LL_ENDL;
 		return;
@@ -936,7 +936,7 @@ bool LLAOEngine::removeAnimation(const LLAOSet* set, LLAOSet::AOState* state, S3
 
 	state->mAnimations.erase(state->mAnimations.begin() + index);
 
-	if (!state->mAnimations.size())
+	if (state->mAnimations.empty())
 	{
 		LL_DEBUGS("AOEngine") << "purging folder " << state->mName << " from inventory because it's empty." << LL_ENDL;
 
@@ -1819,7 +1819,7 @@ void LLAOEngine::processImport(bool aFromTimer)
 	for (S32 index = 0; index < LLAOSet::AOSTATES_MAX; ++index)
 	{
 		LLAOSet::AOState* state = mImportSet->getState(index);
-		if (state->mAnimations.size())
+		if (!state->mAnimations.empty())
 		{
 			allComplete = false;
 			LL_DEBUGS("AOEngine") << "state " << state->mName << " still has animations to link." << LL_ENDL;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index fbc585ed92..87cb918b63 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -781,7 +781,7 @@ void LLWearableHoldingPattern::onAllComplete()
 	}
 
 	// Activate all gestures in this folder
-	if (mGestItems.size() > 0)
+	if (!mGestItems.empty())
 	{
 		LL_DEBUGS("Avatar") << self_av_string() << "Activating " << mGestItems.size() << " gestures" << LL_ENDL;
 		
@@ -820,7 +820,7 @@ void LLWearableHoldingPattern::onAllComplete()
 		// pre-attachment states.
 		gAgentAvatarp->clearAttachmentOverrides();
 
-		if (objects_to_remove.size() || items_to_add.size())
+		if (!objects_to_remove.empty() || !items_to_add.empty())
 		{
 			LL_DEBUGS("Avatar") << "ATT will remove " << objects_to_remove.size()
 								<< " and add " << items_to_add.size() << " items" << LL_ENDL;
@@ -1002,7 +1002,7 @@ void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type
 
 bool LLWearableHoldingPattern::isMissingCompleted()
 {
-	return mTypesToLink.size()==0 && mTypesToRecover.size()==0;
+	return mTypesToLink.empty() && mTypesToRecover.empty();
 }
 
 void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
@@ -1068,7 +1068,7 @@ void LLWearableHoldingPattern::handleLateArrivals()
 	// wearables and other processing - otherwise we could be in some
 	// intermediate state - but have not been superceded by a later
 	// outfit change request.
-	if (mLateArrivals.size() == 0)
+	if (mLateArrivals.empty())
 	{
 		// Nothing to process.
 		return;
@@ -1478,7 +1478,7 @@ void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
     }
 
     // Batch up COF link creation - more efficient if using AIS.
-    if (items_to_link.size())
+    if (!items_to_link.empty())
     {
         link_inventory_array(getCOF(), items_to_link, cb); 
     }
@@ -1834,7 +1834,7 @@ bool LLAppearanceMgr::getCanRemoveFromCOF(const LLUUID& outfit_cat_id)
 		items,
 		LLInventoryModel::EXCLUDE_TRASH,
 		is_worn);
-	return items.size() > 0;
+	return !items.empty();
 }
 
 // static
@@ -1854,7 +1854,7 @@ bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id)
 		LLInventoryModel::EXCLUDE_TRASH,
 		not_worn);
 
-	return items.size() > 0;
+	return !items.empty();
 }
 
 bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
@@ -1881,7 +1881,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
 		LLInventoryModel::EXCLUDE_TRASH,
 		is_wearable);
 
-	return items.size() > 0;
+	return !items.empty();
 }
 
 // Moved from LLWearableList::ContextMenu for wider utility.
@@ -2166,7 +2166,7 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder)
 		}
 	}
 
-	if(wearables.size() > 0)
+	if(!wearables.empty())
 	{
 		gAgentWearables.setWearableOutfit(items, wearables);
 	}
@@ -2262,7 +2262,7 @@ void LLAppearanceMgr::enforceCOFItemRestrictions(LLPointer<LLInventoryCallback>
 {
 	LLInventoryObject::object_list_t items_to_kill;
 	findAllExcessOrDuplicateItems(getCOF(), items_to_kill);
-	if (items_to_kill.size()>0)
+	if (!items_to_kill.empty())
 	{
 		// Remove duplicate or excess wearables. Should normally be enforced at the UI level, but
 		// this should catch anything that gets through.
@@ -2350,7 +2350,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
 				<< " descendent_count " << cof->getDescendentCount()
 				<< " viewer desc count " << cof->getViewerDescendentCount() << LL_ENDL;
 	}
-	if(!wear_items.size())
+	if(wear_items.empty())
 	{
 		LLNotificationsUtil::add("CouldNotPutOnOutfit");
 		return;
@@ -2640,7 +2640,7 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name)
 									has_name);
 	bool copy_items = false;
 	LLInventoryCategory* cat = NULL;
-	if (cat_array.size() > 0)
+	if (!cat_array.empty())
 	{
 		// Just wear the first one that matches
 		cat = cat_array.at(0);
@@ -2652,7 +2652,7 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name)
 										item_array,
 										LLInventoryModel::EXCLUDE_TRASH,
 										has_name);
-		if(cat_array.size() > 0)
+		if(!cat_array.empty())
 		{
 			cat = cat_array.at(0);
 			copy_items = true;
@@ -2809,7 +2809,7 @@ LLInventoryModel::item_array_t LLAppearanceMgr::findCOFItemLinks(const LLUUID& i
 bool LLAppearanceMgr::isLinkedInCOF(const LLUUID& item_id)
 {
 	LLInventoryModel::item_array_t links = LLAppearanceMgr::instance().findCOFItemLinks(item_id);
-	return links.size() > 0;
+	return !links.empty();
 }
 
 void LLAppearanceMgr::removeAllClothesFromAvatar()
@@ -3338,7 +3338,7 @@ bool LLAppearanceMgr::validateClothingOrderingInfo(LLUUID cat_id)
 				<< " (from: " << item->getActualDescription() << ")" << LL_ENDL;
 	}
 	
-	return desc_map.size() == 0;
+	return desc_map.empty();
 }
 
 void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id,
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b669e7744e..943db853ee 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4405,7 +4405,7 @@ void LLAppViewer::forceDisconnect(const std::string& mesg)
 
 	// *TODO: Translate the message if possible
 	std::string big_reason = LLAgent::sTeleportErrorMessages[mesg];
-	if ( big_reason.size() == 0 )
+	if (big_reason.empty())
 	{
 		big_reason = mesg;
 	}
diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp
index 205569e2fc..d8077415eb 100644
--- a/indra/newview/llattachmentsmgr.cpp
+++ b/indra/newview/llattachmentsmgr.cpp
@@ -120,7 +120,7 @@ void LLAttachmentsMgr::onIdle()
 
 void LLAttachmentsMgr::requestPendingAttachments()
 {
-	if (mPendingAttachments.size())
+	if (!mPendingAttachments.empty())
 	{
 		requestAttachments(mPendingAttachments);
 	}
@@ -220,7 +220,7 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
 
 void LLAttachmentsMgr::linkRecentlyArrivedAttachments()
 {
-    if (mRecentlyArrivedAttachments.size())
+    if (!mRecentlyArrivedAttachments.empty())
     {
         // One or more attachments have arrived but have not yet been
         // processed for COF links
@@ -257,7 +257,7 @@ void LLAttachmentsMgr::linkRecentlyArrivedAttachments()
                 ids_to_link.push_back(item_id);
             }
         }
-        if (ids_to_link.size())
+        if (!ids_to_link.empty())
         {
             LLPointer<LLInventoryCallback> cb = new LLRequestServerAppearanceUpdateOnDestroy();
             for (uuid_vec_t::const_iterator uuid_it = ids_to_link.begin();
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 1694160e71..a36642b7a7 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -137,7 +137,7 @@ void LLAvatarActions::removeFriendDialog(const LLUUID& id)
 // static
 void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids)
 {
-	if(ids.size() == 0)
+	if(ids.empty())
 		return;
 
 	LLSD args;
@@ -184,7 +184,7 @@ void LLAvatarActions::offerTeleport(const LLUUID& invitee)
 // static
 void LLAvatarActions::offerTeleport(const uuid_vec_t& ids) 
 {
-	if (ids.size() == 0)
+	if (ids.empty())
 		return;
 
 	handle_lure(ids);
@@ -249,7 +249,7 @@ void LLAvatarActions::startCall(const LLUUID& id)
 // static
 void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids, const LLUUID& floater_id)
 {
-	if (ids.size() == 0)
+	if (ids.empty())
 	{
 		return;
 	}
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 8fb9672d32..9685afb881 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -450,7 +450,7 @@ void LLAvatarTracker::removeObserver(LLFriendObserver* observer)
 
 void LLAvatarTracker::idleNotifyObservers()
 {
-	if (mModifyMask == LLFriendObserver::NONE && mChangedBuddyIDs.size() == 0)
+	if (mModifyMask == LLFriendObserver::NONE && mChangedBuddyIDs.empty())
 	{
 		return;
 	}
@@ -501,7 +501,7 @@ void LLAvatarTracker::removeParticularFriendObserver(const LLUUID& buddy_id, LLF
     obs_it->second.erase(observer);
 
     // purge empty sets from the map
-    if (obs_it->second.size() == 0)
+    if (obs_it->second.empty())
     	mParticularFriendObserverMap.erase(obs_it);
 }
 
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 3687f463c0..0cfe69d582 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -257,7 +257,7 @@ public:
 
 		if (gdatap->isRoleMemberDataComplete())
 		{
-			if (gdatap->mMembers.size())
+			if (!gdatap->mMembers.empty())
 			{
 				LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find(participant_uuid);
 				if (mi != gdatap->mMembers.end())
@@ -1238,7 +1238,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
 		name_params.readonly_color(txt_color);
 	}
 
-	bool prependNewLineState = mEditor->getText().size() != 0;
+	bool prependNewLineState = !mEditor->getText().empty();
 
 	// compact mode: show a timestamp and name
 	if (use_plain_text_chat_history)
@@ -1267,7 +1267,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
 		}
 
 		// names showing
-		if (args["show_names_for_p2p_conv"].asBoolean() && utf8str_trim(chat.mFromName).size() != 0)
+		if (args["show_names_for_p2p_conv"].asBoolean() && !utf8str_trim(chat.mFromName).empty())
 		{
 			// Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text.
 			if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull())
@@ -1358,7 +1358,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
 		view->setOrigin(target_rect.mLeft, view->getRect().mBottom);
 
 		std::string widget_associated_text = "\n[" + chat.mTimeStr + "] ";
-		if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM)
+		if (!utf8str_trim(chat.mFromName).empty() && chat.mFromName != SYSTEM_FROM)
 			widget_associated_text += chat.mFromName + delimiter;
 
 		mEditor->appendWidget(p, widget_associated_text, false);
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index a5bad93ed2..e2313adea2 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -642,7 +642,7 @@ bool LLCOFWearables::getSelectedUUIDs(uuid_vec_t& selected_ids)
 	if (!mLastSelectedList) return false;
 
 	mLastSelectedList->getSelectedUUIDs(selected_ids);
-	return selected_ids.size() != 0;
+	return !selected_ids.empty();
 }
 
 LLPanel* LLCOFWearables::getSelectedItem()
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index c4297fb339..9a7fad7589 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -395,7 +395,7 @@ bool LLCommandLineParser::parseCommandLineString(const std::string& str)
         i != tok.end();
         ++i)
     {
-        if(0 != i->size())
+        if(!i->empty())
         {
             tokens.push_back(*i);
         }
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 17bebe2cbd..89dce658fa 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -247,7 +247,7 @@ void LLFloaterScriptQueue::addStringMessage(const std::string &message)
 
 BOOL LLFloaterScriptQueue::isDone() const
 {
-	return (mCurrentObjectID.isNull() && (mObjectList.size() == 0));
+	return (mCurrentObjectID.isNull() && (mObjectList.empty()));
 }
 
 ///----------------------------------------------------------------------------
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 13a391ec92..6c1cbb3032 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -454,7 +454,7 @@ std::string LLConversationLog::getFileName()
 
 bool LLConversationLog::saveToFile(const std::string& filename)
 {
-	if (!filename.size())
+	if (filename.empty())
 	{
 		LL_WARNS() << "Call log list filename is empty!" << LL_ENDL;
 		return false;
@@ -494,7 +494,7 @@ bool LLConversationLog::saveToFile(const std::string& filename)
 }
 bool LLConversationLog::loadFromFile(const std::string& filename)
 {
-	if(!filename.size())
+	if(filename.empty())
 	{
 		LL_WARNS() << "Call log list filename is empty!" << LL_ENDL;
 		return false;
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 4e2309099e..3cbecc064d 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -264,7 +264,7 @@ void LLConversationItemSession::updateName(LLConversationItemParticipant* partic
 	}
 
 	// Avoid changing the default name if no participant present yet
-	if (mChildren.size() == 0)
+	if (mChildren.empty())
 	{
 		return;
 	}
@@ -299,7 +299,7 @@ void LLConversationItemSession::updateName(LLConversationItemParticipant* partic
 		}
 	}
 
-	if (temp_uuids.size() != 0)
+	if (!temp_uuids.empty())
 	{
 		std::string new_session_name;
 		LLAvatarActions::buildResidentsString(temp_uuids, new_session_name);
diff --git a/indra/newview/lldeferredsounds.cpp b/indra/newview/lldeferredsounds.cpp
index e1613e4719..f7a7a89184 100644
--- a/indra/newview/lldeferredsounds.cpp
+++ b/indra/newview/lldeferredsounds.cpp
@@ -37,7 +37,7 @@ void LLDeferredSounds::deferSound(SoundData& sound)
 }
 void LLDeferredSounds::playdeferredSounds()
 {
-	while(soundVector.size())
+	while(!soundVector.empty())
 	{
 		if (gAudiop)
 		{
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index fd28d722ed..156df1755a 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -315,9 +315,9 @@ void LLDoNotDisturbNotificationStorage::removeNotification(const char * name, co
 
 
     //Remove the notifications
-    if(itemsToRemove.size())
+    if(!itemsToRemove.empty())
     {
-        while(itemsToRemove.size())
+        while(!itemsToRemove.empty())
         {
             it = itemsToRemove.back();
             notification = it->second;
diff --git a/indra/newview/lleasymessagesender.cpp b/indra/newview/lleasymessagesender.cpp
index a6f92b73e5..7cc9b11058 100644
--- a/indra/newview/lleasymessagesender.cpp
+++ b/indra/newview/lleasymessagesender.cpp
@@ -57,13 +57,13 @@ bool LLEasyMessageSender::sendMessage(const LLHost& region_host, const std::stri
 bool LLEasyMessageSender::sendLLUDPMessage(const LLHost& region_host, const std::string& str_message)
 {
 	std::vector<std::string> lines = split(str_message, "\n");
-	if(!lines.size())
+	if(lines.empty())
 	{
 		LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", "Not enough information :O"));
 		return false;
 	}
 	std::vector<std::string> tokens = split(lines[0], " ");
-	if(!tokens.size())
+	if(tokens.empty())
 	{
 		LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", "Not enough information :O"));
 		return false;
diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h
index 024cc5c270..408f96f2ad 100644
--- a/indra/newview/lleventnotifier.h
+++ b/indra/newview/lleventnotifier.h
@@ -96,7 +96,8 @@ public:
 
 	U32					getEventID() const				{ return mEventID; }
 	const std::string	&getEventName() const			{ return mEventName; }
-	bool                isValid() const                 { return mEventID > 0 && mEventDateEpoch != 0 && mEventName.size() > 0; }
+	bool                isValid() const                 { return mEventID > 0 && mEventDateEpoch != 0 && !mEventName.
+        empty(); }
 	const F64		    &getEventDateEpoch() const		{ return mEventDateEpoch; }
 	const std::string   &getEventDateStr() const        { return mEventDateStr; }
 	
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index db87e61378..a35bf3a9f1 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -786,7 +786,7 @@ void LLFavoritesBarCtrl::updateButtons()
 		}
 		int last_right_edge = 0;
 		//calculate new buttons offset
-		if (getChildList()->size() > 0)
+		if (!getChildList()->empty())
 		{
 			//find last visible child to get the rightest button offset
 			child_list_const_reverse_iter_t last_visible_it = std::find_if(childs->rbegin(), childs->rend(), 
diff --git a/indra/newview/llfloaterao.cpp b/indra/newview/llfloaterao.cpp
index a2582b52e8..5dc6260f3b 100644
--- a/indra/newview/llfloaterao.cpp
+++ b/indra/newview/llfloaterao.cpp
@@ -381,7 +381,7 @@ void LLFloaterAO::onSelectState()
 	if (!mSelectedState) return;
 	
 	mSelectedState = static_cast<LLAOSet::AOState*>(mStateSelector->getCurrentUserdata());
-	if (mSelectedState->mAnimations.size())
+	if (!mSelectedState->mAnimations.empty())
 	{
 		for (auto& ao_animation : mSelectedState->mAnimations)
         {
@@ -534,7 +534,7 @@ void LLFloaterAO::onChangeAnimationSelection()
 		mAnimationList->deselectAllItems();
 		LL_DEBUGS("AOEngine") << "Selection count now: " << list.size() << LL_ENDL;
 	}
-	else if (list.size() > 0)
+	else if (!list.empty())
 	{
 		if (list.size() == 1)
 		{
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 0e4a5f0875..eed079b29d 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -513,7 +513,7 @@ void LLFloaterAvatarPicker::find()
 		{
 			// capability urls don't end in '/', but we need one to parse
 			// query parameters correctly
-			if (url.size() > 0 && url[url.size()-1] != '/')
+			if (!url.empty() && url[url.size()-1] != '/')
 			{
 				url += "/";
 			}
@@ -778,7 +778,7 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
 //static
 void LLFloaterAvatarPicker::editKeystroke(LLLineEditor* caller, void* user_data)
 {
-	getChildView("Find")->setEnabled(caller->getText().size() > 0);
+	getChildView("Find")->setEnabled(!caller->getText().empty());
 }
 
 // virtual
@@ -838,7 +838,7 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled()
 			uuid_vec_t avatar_ids;
 			std::vector<LLAvatarName> avatar_names;
 			getSelectedAvatarData(list, avatar_ids, avatar_names);
-			if (avatar_ids.size() >= 1) 
+			if (!avatar_ids.empty()) 
 			{
 				ret_val = mOkButtonValidateSignal.num_slots()?mOkButtonValidateSignal(avatar_ids):true;
 			}
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 614007fbc5..daaead69b1 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -244,7 +244,7 @@ BOOL LLFloaterBulkPermission::nextObject()
 			successful_start = popNext();
 			//LL_INFOS() << (successful_start ? "successful" : "unsuccessful") << LL_ENDL; 
 		}
-	} while((mObjectIDs.size() > 0) && !successful_start);
+	} while((!mObjectIDs.empty()) && !successful_start);
 
 	if(isDone() && !mDone)
 	{
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index b1fc542542..60866a8a9e 100644
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -78,7 +78,7 @@ private:
 	void onUncheckAll() { doCheckUncheckAll(FALSE); }
 	
 	// returns true if this is done
-	BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.size() == 0)); }
+	BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.empty())); }
 
 	//Read the settings and Apply the permissions
 	void doApply();
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp
index 9ce98ca9d2..0f7a75d8c5 100644
--- a/indra/newview/llfloaterconversationpreview.cpp
+++ b/indra/newview/llfloaterconversationpreview.cpp
@@ -102,7 +102,7 @@ void LLFloaterConversationPreview::setPages(std::list<LLSD>* messages, const std
 			delete mMessages; // Clean up temporary message list with "Loading..." text
 		}
 		mMessages = messages;
-		mCurrentPage = (mMessages->size() ? (mMessages->size() - 1) / mPageSize : 0);
+		mCurrentPage = (!mMessages->empty() ? (mMessages->size() - 1) / mPageSize : 0);
 
 		mPageSpinner->setEnabled(true);
 		mPageSpinner->setMaxValue(mCurrentPage+1);
@@ -196,7 +196,7 @@ void LLFloaterConversationPreview::showHistory()
 {
 	// additional protection to avoid changes of mMessages in setPages
 	LLMutexLock lock(&mMutex);
-	if(mMessages == nullptr || !mMessages->size() || mCurrentPage * mPageSize >= mMessages->size())
+	if(mMessages == nullptr || mMessages->empty() || mCurrentPage * mPageSize >= mMessages->size())
 	{
 		return;
 	}
diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp
index fc5db393c0..9585c55588 100644
--- a/indra/newview/llfloatereditdaycycle.cpp
+++ b/indra/newview/llfloatereditdaycycle.cpp
@@ -195,7 +195,7 @@ void LLFloaterEditDayCycle::applyTrack()
 	LL_DEBUGS() << "Applying track (" << mSliderToKey.size() << ")" << LL_ENDL;
 
 	// if no keys, do nothing
-	if (mSliderToKey.size() == 0)
+	if (mSliderToKey.empty())
 	{
 		LL_DEBUGS() << "No keys, not syncing" << LL_ENDL;
 		return;
@@ -295,7 +295,7 @@ void LLFloaterEditDayCycle::refreshDayCyclesList()
 		mDayCyclesCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
 	}
 
-	if (user_days.size() > 0)
+	if (!user_days.empty())
 	{
 		mDayCyclesCombo->addSeparator();
 	}
@@ -355,7 +355,7 @@ void LLFloaterEditDayCycle::onKeyTimeMoved()
 void LLFloaterEditDayCycle::onKeyTimeChanged()
 {
 	// if no keys, skipped
-	if (mSliderToKey.size() == 0)
+	if (mSliderToKey.empty())
 	{
 		return;
 	}
@@ -594,7 +594,7 @@ bool LLFloaterEditDayCycle::getApplyProgress() const
 
 void LLFloaterEditDayCycle::onDeleteKey()
 {
-	if (mSliderToKey.size() == 0)
+	if (mSliderToKey.empty())
 	{
 		return;
 	}
@@ -611,7 +611,7 @@ void LLFloaterEditDayCycle::onDeleteKey()
 
 	mKeysSlider->deleteCurSlider();
 
-	if (mSliderToKey.size() == 0)
+	if (mSliderToKey.empty())
 	{
 		return;
 	}
diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp
index c5d719222f..5769a7af42 100644
--- a/indra/newview/llfloatereditsky.cpp
+++ b/indra/newview/llfloatereditsky.cpp
@@ -686,7 +686,7 @@ void LLFloaterEditSky::refreshSkyPresetsList()
 	{
 		mSkyPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
 	}
-	if (user_presets.size() > 0)
+	if (!user_presets.empty())
 	{
 		mSkyPresetCombo->addSeparator();
 	}
diff --git a/indra/newview/llfloatereditwater.cpp b/indra/newview/llfloatereditwater.cpp
index e03a9f4f52..b1cea8af38 100644
--- a/indra/newview/llfloatereditwater.cpp
+++ b/indra/newview/llfloatereditwater.cpp
@@ -517,7 +517,7 @@ void LLFloaterEditWater::refreshWaterPresetsList()
 		mWaterPresetCombo->add(name, LLSD().with(0, name).with(1, LLEnvKey::SCOPE_LOCAL)); // [<name>, <scope>]
 	}
 
-	if (user_presets.size() > 0)
+	if (!user_presets.empty())
 	{
 		mWaterPresetCombo->addSeparator();
 	}
diff --git a/indra/newview/llfloaterenvironmentsettings.cpp b/indra/newview/llfloaterenvironmentsettings.cpp
index 5f0a336a96..a9b9df9e81 100644
--- a/indra/newview/llfloaterenvironmentsettings.cpp
+++ b/indra/newview/llfloaterenvironmentsettings.cpp
@@ -220,7 +220,7 @@ void LLFloaterEnvironmentSettings::populateWaterPresetsList()
 		mWaterPresetCombo->add(*it);
 	}
 
-	if (user_presets.size() > 0)
+	if (!user_presets.empty())
 	{
 		mWaterPresetCombo->addSeparator();
 	}
@@ -271,7 +271,7 @@ void LLFloaterEnvironmentSettings::populateDayCyclePresetsList()
 		mDayCyclePresetCombo->add(*it);
 	}
 
-	if (user_days.size() > 0)
+	if (!user_days.empty())
 	{
 		mDayCyclePresetCombo->addSeparator();
 	}
diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp
index b7d6e81f9f..8135ce7515 100644
--- a/indra/newview/llfloaterexperienceprofile.cpp
+++ b/indra/newview/llfloaterexperienceprofile.cpp
@@ -415,7 +415,7 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
 
             child = getChild<LLTextBox>(TF_MRKT);
             child->setText(value);
-            if(value.size())
+            if(!value.empty())
             {
                 marketplacePanel->setVisible(TRUE);
             }
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index b2395da775..a84adcfdb5 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1277,7 +1277,7 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command,
 		}
 		else if ("chat_history" == command)
 		{
-			if (selectedIDS.size() > 0)
+			if (!selectedIDS.empty())
 			{
 				if (conversationItem->getType() == LLConversationItem::CONV_SESSION_GROUP)
 				{
@@ -1397,7 +1397,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
 	}
 
 	//Enable Chat history item for ad-hoc and group conversations
-	if ("can_chat_history" == item && uuids.size() > 0)
+	if ("can_chat_history" == item && !uuids.empty())
 	{
 		//Disable menu item if selected participant is user agent
 		if (uuids.front() != gAgentID)
@@ -1424,7 +1424,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
 	}
 
 	// If nothing is selected(and selected item is not group chat), everything needs to be disabled
-	if (uuids.size() <= 0)
+	if (uuids.empty())
 	{
 		if (getCurSelectedViewModelItem())
 		{
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 5b12cca5eb..2a40247fe2 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -295,7 +295,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
 	find last toast and check ID
 	*/
 
-	if (m_active_toasts.size())
+	if (!m_active_toasts.empty())
 	{
 		LLUUID fromID = chat["from_id"].asUUID();		// agent id or object id
 		std::string from = chat["from"].asString();
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 100295d174..e35f8806a7 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -830,7 +830,7 @@ void LLFloaterIMSession::updateMessages()
     LLIMModel::instance().getMessages(
     		mSessionID, messages, mLastMessageIndex + 1, hasFocus());
 
-	if (messages.size())
+	if (!messages.empty())
 	{
 		std::list<LLSD>::const_reverse_iterator iter = messages.rbegin();
 		std::list<LLSD>::const_reverse_iterator iter_end = messages.rend();
@@ -1076,7 +1076,7 @@ void LLFloaterIMSession::processAgentListUpdates(const LLSD& body)
 						  joined_uuids.begin(), joined_uuids.end(),
 						  std::back_inserter(intersection));
 
-	if (intersection.size() > 0)
+	if (!intersection.empty())
 	{
 		sendParticipantsAddedNotification(intersection);
 	}
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index a0edb2f438..a87667f945 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -583,7 +583,7 @@ void LLFloaterIMSessionTab::refreshConversation()
 	{
 		// Build the session name and update it
 		std::string session_name;
-		if (participants_uuids.size() != 0)
+		if (!participants_uuids.empty())
 		{
 			LLAvatarActions::buildResidentsString(participants_uuids, session_name);
 		}
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index be235259bc..d782fbcde4 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -106,7 +106,7 @@ void LLFloaterInspect::onOpen(const LLSD& key)
 
 void LLFloaterInspect::onClickCreatorProfile()
 {
-	if(mObjectList->getAllSelected().size() == 0)
+	if(mObjectList->getAllSelected().empty())
 	{
 		return;
 	}
@@ -134,7 +134,7 @@ void LLFloaterInspect::onClickCreatorProfile()
 
 void LLFloaterInspect::onClickOwnerProfile()
 {
-	if(mObjectList->getAllSelected().size() == 0) return;
+	if(mObjectList->getAllSelected().empty()) return;
 	LLScrollListItem* first_selected =mObjectList->getFirstSelected();
 
 	if (first_selected)
@@ -179,7 +179,7 @@ void LLFloaterInspect::onSelectObject()
 
 LLUUID LLFloaterInspect::getSelectedUUID()
 {
-	if(mObjectList->getAllSelected().size() > 0)
+	if(!mObjectList->getAllSelected().empty())
 	{
 		LLScrollListItem* first_selected =mObjectList->getFirstSelected();
 		if (first_selected)
diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp
index 7cd447a929..bca0186ed9 100644
--- a/indra/newview/llfloaterlinkreplace.cpp
+++ b/indra/newview/llfloaterlinkreplace.cpp
@@ -152,7 +152,7 @@ void LLFloaterLinkReplace::onStartClicked()
 									is_linked_item_match);
 	LL_INFOS() << "Found " << mRemainingInventoryItems.size() << " inventory links that need to be replaced." << LL_ENDL;
 
-	if (mRemainingInventoryItems.size() > 0)
+	if (!mRemainingInventoryItems.empty())
 	{
 		LLViewerInventoryItem* target_item = gInventory.getItem(mTargetUUID);
 		if (target_item)
@@ -279,7 +279,7 @@ BOOL LLFloaterLinkReplace::tick()
 
 	for (U32 i = 0; i < mBatchSize; ++i)
 	{
-		if (!mRemainingInventoryItems.size())
+		if (mRemainingInventoryItems.empty())
 		{
 			mEventTimer.stop();
 			break;
diff --git a/indra/newview/llfloatermessagelog.cpp b/indra/newview/llfloatermessagelog.cpp
index 4270d4a763..4d27dd1400 100644
--- a/indra/newview/llfloatermessagelog.cpp
+++ b/indra/newview/llfloatermessagelog.cpp
@@ -504,7 +504,7 @@ void LLFloaterMessageLog::conditionalLog(LogPayload entry)
 	}
 
 	std::string net_name;
-	if (item->mRegionHosts.size() > 0)
+	if (!item->mRegionHosts.empty())
 	{
 		//LLHost find_host = outgoing ? item->mToHost : item->mFromHost;
 		//net_name = find_host.getIPandPort();
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 761d498a71..add3cafaf7 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -220,7 +220,7 @@ LLMeshFilePicker::LLMeshFilePicker(LLModelPreview* mp, S32 lod)
 
 void LLMeshFilePicker::notify(const std::vector<std::string>& filenames)
 {
-	if (filenames.size() > 0)
+	if (!filenames.empty())
 	{
 		mMP->loadModel(filenames[0], mLOD);
 	}
@@ -1633,7 +1633,7 @@ void LLModelPreview::rebuildUploadData()
 				}
                 LLFloaterModelPreview* fmp = (LLFloaterModelPreview*) mFMP;
                 bool upload_skinweights = fmp && fmp->childGetValue("upload_skin").asBoolean();
-                if (upload_skinweights && high_lod_model->mSkinInfo.mJointNames.size() > 0)
+                if (upload_skinweights && !high_lod_model->mSkinInfo.mJointNames.empty())
                 {
                     LLQuaternion bind_rot = LLSkinningUtil::getUnscaledQuaternion(high_lod_model->mSkinInfo.mBindShapeMatrix);
                     LLQuaternion identity;
@@ -3544,7 +3544,7 @@ U32 LLModelPreview::loadTextures(LLImportMaterial& material,void* opaque)
 {
 	(void)opaque;
 
-	if (material.mDiffuseMapFilename.size())
+	if (!material.mDiffuseMapFilename.empty())
 	{
 		material.mOpaqueData = new LLPointer< LLViewerFetchedTexture >;
 		LLPointer< LLViewerFetchedTexture >& tex = (*reinterpret_cast< LLPointer< LLViewerFetchedTexture > * >(material.mOpaqueData));
@@ -4360,7 +4360,7 @@ bool LLModelPreview::lodQueryCallback()
     if (fmp && fmp->mModelPreview)
     {
         LLModelPreview* preview = fmp->mModelPreview;
-        if (preview->mLodsQuery.size() > 0)
+        if (!preview->mLodsQuery.empty())
         {
             S32 lod = preview->mLodsQuery.back();
             preview->mLodsQuery.pop_back();
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 56ab9387fd..0db9ad2006 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2214,7 +2214,7 @@ void LLFloaterPreference::selectChatPanel()
 
 void LLFloaterPreference::changed()
 {
-	getChild<LLButton>("clear_log")->setEnabled(LLConversationLog::instance().getConversations().size() > 0);
+	getChild<LLButton>("clear_log")->setEnabled(!LLConversationLog::instance().getConversations().empty());
 
 	// set 'enable' property for 'Delete transcripts...' button
 	updateDeleteTranscriptsButton();
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 9fee704430..74b26543c2 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -2620,7 +2620,7 @@ void LLPanelEnvironmentInfo::populateWaterPresetsList()
 		mWaterPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
 	}
 
-	if (user_presets.size() > 0)
+	if (!user_presets.empty())
 	{
 		mWaterPresetCombo->addSeparator();
 	}
@@ -2706,7 +2706,7 @@ void LLPanelEnvironmentInfo::populateDayCyclesList()
 		mDayCyclePresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
 	}
 
-	if (user_days.size() > 0)
+	if (!user_days.empty())
 	{
 		mDayCyclePresetCombo->addSeparator();
 	}
@@ -3794,7 +3794,7 @@ void LLPanelEstateAccess::accessRemoveCore(U32 operation_flag, const std::string
 	if (!name_list) return;
 
 	std::vector<LLScrollListItem*> list_vector = name_list->getAllSelected();
-	if (list_vector.size() == 0)
+	if (list_vector.empty())
 		return;
 
 	LLSD payload;
@@ -4205,7 +4205,7 @@ void LLPanelEstateAccess::copyListToClipboard(std::string list_name)
 	if (!name_list) return;
 
 	std::vector<LLScrollListItem*> list_vector = name_list->getAllData();
-	if (list_vector.size() == 0) return;
+	if (list_vector.empty()) return;
 
 	LLSD::String list_to_copy;
 	for (std::vector<LLScrollListItem*>::const_iterator iter = list_vector.begin();
diff --git a/indra/newview/llfloatertexturepicker.cpp b/indra/newview/llfloatertexturepicker.cpp
index a85d56b8bc..2f5a061760 100644
--- a/indra/newview/llfloatertexturepicker.cpp
+++ b/indra/newview/llfloatertexturepicker.cpp
@@ -588,7 +588,7 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
 							LLInventoryModel::INCLUDE_TRASH,
 							asset_id_matches);
 
-	if (items.size())
+	if (!items.empty())
 	{
 		// search for copyable version first
 		for (auto& item : items)
@@ -743,7 +743,7 @@ void LLFloaterTexturePicker::onApplyUUID(void* userdata)
 
 void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
 {
-	if (items.size())
+	if (!items.empty())
 	{
 		LLFolderViewItem* first_item = items.front();
 		LLInventoryItem* itemp = gInventory.getItem(static_cast<LLFolderViewModelItemInventory*>(first_item->getViewModelItem())->getUUID());
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index d69662336a..f3ca33f0fe 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -164,7 +164,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
 			F32 script_size = 0.f;
 			msg->getString("DataExtended", "ParcelName", parcel_name, block);
 			msg->getF32("DataExtended", "Size", script_size, block);
-			if (parcel_name.size() > 0 || script_size > 0)
+			if (!parcel_name.empty() || script_size > 0)
 			{
 				parcel_buf = parcel_name;
 				script_memory = script_size;
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index ccd0ab2e56..4ccaf2633b 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -1622,7 +1622,7 @@ void LLOverlapPanel::draw()
 		}
 
 		std::list<LLView*> overlappers = mOverlapMap[LLView::sPreviewClickedElement];
-		if(overlappers.size() == 0)
+		if(overlappers.empty())
 		{
 			LLUI::translate(5,getRect().getHeight()-20);	// translate to top-5,left-5
 			LLView::sDrawPreviewHighlights = FALSE;
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 185924404a..8e9e35b2c1 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -69,7 +69,7 @@ inline const std::string get_friend_all_subfolder_name()
 
 void move_from_to_arrays(LLInventoryModel::cat_array_t& from, LLInventoryModel::cat_array_t& to)
 {
-	while (from.size() > 0)
+	while (!from.empty())
 	{
 		to.push_back(from.at(0));
 		from.erase(from.begin());
@@ -209,7 +209,7 @@ bool LLFriendCardsManager::isItemInAnyFriendsList(const LLViewerInventoryItem* i
 	LLInventoryModel::item_array_t items;
 	findMatchedFriendCards(item->getCreatorUUID(), items);
 
-	return items.size() > 0;
+	return !items.empty();
 }
 
 
@@ -382,7 +382,7 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve
 	LLInventoryModel::cat_array_t subFolders;
 	subFolders.push_back(friendFolder);
 
-	while (subFolders.size() > 0)
+	while (!subFolders.empty())
 	{
 		LLViewerInventoryCategory* cat = subFolders.at(0);
 		subFolders.erase(subFolders.begin());
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 9f76e4d526..aa6d3618ab 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -657,7 +657,7 @@ BOOL LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::strin
 			}
 
 			
-			if (matching.size() > 0)
+			if (!matching.empty())
 			{
 				// choose one at random
 				{
@@ -732,7 +732,7 @@ BOOL LLGestureMgr::triggerGesture(KEY key, MASK mask)
 	}
 
 	// choose one and play it
-	if (matching.size() > 0)
+	if (!matching.empty())
 	{
 		U32 random = ll_rand(matching.size());
 		
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index a07c673dbd..0289b57b9d 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -764,7 +764,7 @@ void LLGroupMgrGroupData::banMemberById(const LLUUID& participant_uuid)
 {
 	if (!mMemberDataComplete ||
 		!mRoleDataComplete ||
-		!(mRoleMemberDataComplete && mMembers.size()))
+		!(mRoleMemberDataComplete && !mMembers.empty()))
 	{
 		LL_WARNS() << "No Role-Member data yet, setting ban request to pending." << LL_ENDL;
 		mPendingBanRequest = true;
@@ -906,7 +906,7 @@ void LLGroupMgr::removeObserver(const LLUUID& group_id, LLParticularGroupObserve
 
     obs_it->second.erase(observer);
 
-    if (obs_it->second.size() == 0)
+    if (obs_it->second.empty())
     	mParticularObservers.erase(obs_it);
 }
 
@@ -1023,7 +1023,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
 		}
 
 		//if group members are loaded while titles are missing, load the titles.
-		if(group_datap->mTitles.size() < 1)
+		if(group_datap->mTitles.empty())
 		{
 			LLGroupMgr::getInstance()->sendGroupTitlesRequest(group_id);
 		}
@@ -2300,7 +2300,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
 	// 
 	// TODO:
 	// Refactor to reduce multiple calls for data we already have.
-	if(group_datap->mTitles.size() < 1)
+	if(group_datap->mTitles.empty())
 		sendGroupTitlesRequest(group_id);
 
 
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 92e62ff2ba..0dcd7a0760 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -305,7 +305,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
 	LLRect screen_rect;
 	screen_rect.setCenterAndSize(0, static_cast<S32>(lltrunc(-mHeight / 2 + mOffsetY)), static_cast<S32>(lltrunc(mWidth)), static_cast<S32>(lltrunc(mHeight)));
 	mRoundedRectImage->draw3D(render_position, x_pixel_vec, y_pixel_vec, screen_rect, bg_color);
-	if (mLabelSegments.size())
+	if (!mLabelSegments.empty())
 	{
 		LLRect label_top_rect = screen_rect;
 		const S32 label_height = ll_round((mFontp->getLineHeight() * (F32)mLabelSegments.size() + (VERTICAL_PADDING / 3.f)));
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 442e1c6d9d..fef248f342 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -927,7 +927,7 @@ LLUUID LLIMModel::LLIMSession::generateOutgoingAdHocHash() const
 {
 	LLUUID hash = LLUUID::null;
 
-	if (mInitialTargetIDs.size())
+	if (!mInitialTargetIDs.empty())
 	{
 		std::set<LLUUID> sorted_uuids(mInitialTargetIDs.begin(), mInitialTargetIDs.end());
 		hash = generateHash(sorted_uuids);
@@ -949,7 +949,7 @@ void LLIMModel::LLIMSession::buildHistoryFileName()
 		* date stamp code introduced in STORM-102 will work properly and not add
 		* a date stamp to the Ad-hoc conferences.
 		*/
-		if (mInitialTargetIDs.size())
+		if (!mInitialTargetIDs.empty())
 		{
 			std::set<LLUUID> sorted_uuids(mInitialTargetIDs.begin(), mInitialTargetIDs.end());
 			mHistoryFileName = mName + " hash" + generateHash(sorted_uuids).asString();
@@ -2927,7 +2927,7 @@ LLUUID LLIMMgr::addSession(
 	bool new_session = (LLIMModel::getInstance()->findIMSession(session_id) == nullptr);
 
 	//works only for outgoing ad-hoc sessions
-	if (new_session && IM_SESSION_CONFERENCE_START == dialog && ids.size())
+	if (new_session && IM_SESSION_CONFERENCE_START == dialog && !ids.empty())
 	{
 		LLIMModel::LLIMSession* ad_hoc_found = LLIMModel::getInstance()->findAdHocIMSession(ids);
 		if (ad_hoc_found)
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index fb1bb0380b..e452d80ac3 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3914,7 +3914,7 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv
 								item_array,
 								LLInventoryModel::EXCLUDE_TRASH,
 								is_type);
-	return ((item_array.size() > 0) ? TRUE : FALSE );
+	return ((!item_array.empty()) ? TRUE : FALSE );
 }
 
 void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items, menuentry_vec_t& disabled_items)
@@ -3936,7 +3936,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items
 		LLInventoryModel::item_array_t* item_array;
 		gInventory.getDirectDescendentsOf(mUUID, cat_array, item_array);
 		// Enable Empty menu item only when there is something to act upon.
-		if (0 == cat_array->size() && 0 == item_array->size())
+		if (cat_array->empty() && item_array->empty())
 		{
 			disabled_items.push_back(std::string("Empty Lost And Found"));
 		}
@@ -4001,7 +4001,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items
 		LLViewerInventoryCategory *trash = getCategory();
 		// Enable Empty menu item only when there is something to act upon.
 		// Also don't enable menu if folder isn't fully fetched
-		if ((0 == cat_array->size() && 0 == item_array->size())
+		if ((cat_array->empty() && item_array->empty())
 			|| is_recent_panel
 			|| !trash
 			|| trash->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index a8c6759587..dbcafa95c2 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -115,7 +115,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
 			break;
 	}
 
-	bool passed = (mFilterSubString.size() ? desc.find(mFilterSubString) != std::string::npos : true);
+	bool passed = (!mFilterSubString.empty() ? desc.find(mFilterSubString) != std::string::npos : true);
 	passed = passed && checkAgainstFilterType(listener);
 	passed = passed && checkAgainstPermissions(listener);
 	passed = passed && checkAgainstFilterLinks(listener);
@@ -126,7 +126,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
 
 bool LLInventoryFilter::check(const LLInventoryItem* item)
 {
-	const bool passed_string = (mFilterSubString.size() ? item->getName().find(mFilterSubString) != std::string::npos : true);
+	const bool passed_string = (!mFilterSubString.empty() ? item->getName().find(mFilterSubString) != std::string::npos : true);
 	const bool passed_filtertype = checkAgainstFilterType(item);
 	const bool passed_permissions = checkAgainstPermissions(item);
 
@@ -516,7 +516,7 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset(LLFolderViewModel
 {
 	if (mSearchType == SEARCHTYPE_NAME)
 	{
-		return mFilterSubString.size() ? item->getSearchableName().find(mFilterSubString) : std::string::npos;
+		return !mFilterSubString.empty() ? item->getSearchableName().find(mFilterSubString) : std::string::npos;
 	}
 	else
 	{
@@ -555,8 +555,8 @@ bool LLInventoryFilter::isActive() const
 		|| mFilterOps.mFilterWearableTypes != 0xffffffffffffffffULL
 		|| mFilterOps.mFilterTypes != FILTERTYPE_OBJECT
 		|| mFilterOps.mFilterLinks != FILTERLINK_INCLUDE_LINKS
-		|| mFilterSubString.size() 
-		|| mFilterOps.mPermissions != PERM_NONE 
+		|| !mFilterSubString.empty()
+        || mFilterOps.mPermissions != PERM_NONE 
 		|| mFilterOps.mMinDate != time_min()
 		|| mFilterOps.mMaxDate != time_max()
 		|| mFilterOps.mHoursAgo != 0;
@@ -1263,7 +1263,7 @@ U64 LLInventoryFilter::getFilterWearableTypes() const
 
 bool LLInventoryFilter::hasFilterString() const
 {
-	return mFilterSubString.size() > 0;
+	return !mFilterSubString.empty();
 }
 
 std::string::size_type LLInventoryFilter::getFilterStringSize() const
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 58cebfd312..f0adb5d138 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1522,7 +1522,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
     // If we have no items in there (only folders or empty), analyze a bit further
     if ((count == 0) && !has_bad_items)
     {
-        if (cat_array->size() == 0)
+        if (cat_array->empty())
         {
             // So we have no item and no folder. That's at least a warning.
             if (depth == 2)
@@ -1561,7 +1561,8 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
         }
     }
     // If we have a single type of items of the right type in the right place, we're done
-    else if ((count == 1) && !has_bad_items && (((unique_key == default_key) && (depth > 1)) || ((folder_type == LLFolderType::FT_MARKETPLACE_STOCK) && (depth > 2) && (cat_array->size() == 0))))
+    else if ((count == 1) && !has_bad_items && (((unique_key == default_key) && (depth > 1)) || ((folder_type == LLFolderType::FT_MARKETPLACE_STOCK) && (depth > 2) && (
+        cat_array->empty()))))
     {
         // Done with that folder : Print out the folder name unless we already found an error here
         if (cb && result && (depth >= 1))
@@ -1575,7 +1576,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
         if (fix_hierarchy && !has_bad_items)
         {
             // Alert the user when an existing stock folder has to be split
-            if ((folder_type == LLFolderType::FT_MARKETPLACE_STOCK) && ((count >= 2) || (cat_array->size() > 0)))
+            if ((folder_type == LLFolderType::FT_MARKETPLACE_STOCK) && ((count >= 2) || (!cat_array->empty())))
             {
                 LLNotificationsUtil::add("AlertMerchantStockFolderSplit");
             }
@@ -1655,7 +1656,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
                     std::string message = indent + cat->getName() + LLTrans::getString("Marketplace Validation Error Mixed Stock");
                     cb(message,depth,LLError::LEVEL_ERROR);
                 }
-                else if ((folder_type == LLFolderType::FT_MARKETPLACE_STOCK) && (cat_array->size() != 0))
+                else if ((folder_type == LLFolderType::FT_MARKETPLACE_STOCK) && (!cat_array->empty()))
                 {
                     // Report if a stock folder contains subfolders
                     result = false;
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 19c4c5a433..22e5fd789d 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -146,11 +146,11 @@ void LLInventoryItemsList::refresh()
             mAddedItems.clear();
             mRemovedItems.clear();
             computeDifference(getIDs(), mAddedItems, mRemovedItems);
-            if (mRemovedItems.size() > 0)
+            if (!mRemovedItems.empty())
             {
                 mRefreshState = REFRESH_LIST_ERASE;
             }
-            else if (mAddedItems.size() > 0)
+            else if (!mAddedItems.empty())
             {
                 mRefreshState = REFRESH_LIST_APPEND;
             }
@@ -184,7 +184,7 @@ void LLInventoryItemsList::refresh()
             // form a list to add
             uuid_vec_t::iterator it = mAddedItems.begin();
             pairs_list_t panel_list;
-            while(mAddedItems.size() > 0 && nadded < ADD_LIMIT)
+            while(!mAddedItems.empty() && nadded < ADD_LIMIT)
             {
                 LLViewerInventoryItem* item = gInventory.getItem(*it);
                 llassert(item);
@@ -227,7 +227,7 @@ void LLInventoryItemsList::refresh()
             rearrangeItems();
             notifyParentItemsRectChanged();
 
-            if (mAddedItems.size() > 0)
+            if (!mAddedItems.empty())
             {
                 mRefreshState = REFRESH_LIST_APPEND;
             }
@@ -244,7 +244,7 @@ void LLInventoryItemsList::refresh()
             // Filter, sort, rearrange and notify parent about shape changes
             filterItems();
 
-            if (mAddedItems.size() == 0)
+            if (mAddedItems.empty())
             {
                 // After list building completed, select items that had been requested to select before list was build
                 updateSelection();
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 6e1c116451..582e681ff6 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -601,7 +601,7 @@ const LLUUID LLInventoryModel::findDescendentCategoryIDByName(const LLUUID& pare
 									item_array,
 									LLInventoryModel::EXCLUDE_TRASH,
 									has_name);
-	if (0 == cat_array.size())
+	if (cat_array.empty())
 		return LLUUID::null;
 	LLViewerInventoryCategory *cat = cat_array.at(0);
 	if (cat)
@@ -1440,7 +1440,7 @@ void LLInventoryModel::onDescendentsPurgedFromServer(const LLUUID& object_id, bo
 				if (getCategory(uu_id))
 				{
 					cat_array_t* cat_list = getUnlockedCatArray(uu_id);
-					if (!cat_list || (cat_list->size() == 0))
+					if (!cat_list || (cat_list->empty()))
 					{
 						deleteObject(uu_id, fix_broken_links);
 						deleted_count++;
@@ -1528,7 +1528,7 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo
 	item_list = getUnlockedItemArray(id);
 	if(item_list)
 	{
-		if (item_list->size())
+		if (!item_list->empty())
 		{
 			LL_WARNS(LOG_INV) << "Deleting cat " << id << " while it still has child items" << LL_ENDL;
 		}
@@ -1538,7 +1538,7 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo
 	cat_list = getUnlockedCatArray(id);
 	if(cat_list)
 	{
-		if (cat_list->size())
+		if (!cat_list->empty())
 		{
 			LL_WARNS(LOG_INV) << "Deleting cat " << id << " while it still has child cats" << LL_ENDL;
 		}
@@ -1573,7 +1573,7 @@ void LLInventoryModel::updateLinkedObjectsFromPurge(const LLUUID &baseobj_id)
 
 	// REBUILD is expensive, so clear the current change list first else
 	// everything else on the changelist will also get rebuilt.
-	if (item_array.size() > 0)
+	if (!item_array.empty())
 	{
 		notifyObservers();
 		for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin();
@@ -1611,7 +1611,7 @@ void LLInventoryModel::idleNotifyObservers()
 	// *FIX:  Think I want this conditional or moved elsewhere...
 	handleResponses(true);
 	
-	if (mModifyMask == LLInventoryObserver::NONE && (mChangedItemIDs.size() == 0))
+	if (mModifyMask == LLInventoryObserver::NONE && (mChangedItemIDs.empty()))
 	{
 		return;
 	}
@@ -1992,12 +1992,12 @@ LLInventoryModel::EHasChildren LLInventoryModel::categoryHasChildren(const LLUUI
 
 	// Shouldn't have to run this, but who knows.
 	const auto cat_it = mParentChildCategoryTree.find(cat->getUUID());
-	if (cat_it != mParentChildCategoryTree.cend() && cat_it->second->size() > 0)
+	if (cat_it != mParentChildCategoryTree.cend() && !cat_it->second->empty())
 	{
 		return CHILDREN_YES;
 	}
 	const auto item_it = mParentChildItemTree.find(cat->getUUID());
-	if (item_it != mParentChildItemTree.cend() && item_it->second->size() > 0)
+	if (item_it != mParentChildItemTree.cend() && !item_it->second->empty())
 	{
 		return CHILDREN_YES;
 	}
@@ -2198,7 +2198,7 @@ bool LLInventoryModel::loadSkeleton(
 					}
 				}
 			}
-			if (possible_broken_links.size() > 0)
+			if (!possible_broken_links.empty())
 			{
 				for(item_array_t::const_iterator item_iter = possible_broken_links.begin();
 				    item_iter != possible_broken_links.end();
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index afbf6ba214..57d90fff89 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -489,7 +489,7 @@ void LLInventoryAddItemByAssetObserver::changed(U32 mask)
 	}
 
 	// nothing is watched
-	if (mWatchedAssets.size() == 0)
+	if (mWatchedAssets.empty())
 	{
 		return;
 	}
@@ -602,7 +602,7 @@ void LLInventoryCategoryAddedObserver::changed(U32 mask)
 
 void LLInventoryCategoriesObserver::changed(U32 mask)
 {
-	if (!mCategoryMap.size())
+	if (mCategoryMap.empty())
 		return;
 
 	std::vector<LLUUID> deleted_categories_ids;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index a60156abdd..0f0c2b5b01 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1144,7 +1144,7 @@ void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& it
 	if (fv->needsAutoRename()) // auto-selecting a new user-created asset and preparing to rename
 	{
 		fv->setNeedsAutoRename(FALSE);
-		if (items.size()) // new asset is visible and selected
+		if (!items.empty()) // new asset is visible and selected
 		{
 			fv->startRenamingSelectedItem();
 		}
diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp
index 7e837a5318..821c7be8fe 100644
--- a/indra/newview/lllocationhistory.cpp
+++ b/indra/newview/lllocationhistory.cpp
@@ -102,7 +102,7 @@ bool LLLocationHistory::getMatchingItems(const std::string& substring, location_
 			result.push_back(mItem);
 	}
 	
-	return result.size();
+	return !result.empty();
 }
 
 void LLLocationHistory::dump() const
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 0fd5e8e325..acff623e89 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -113,7 +113,7 @@ using namespace boost::gregorian;
 
 void append_to_last_message(std::list<LLSD>& messages, const std::string& line)
 {
-	if (!messages.size()) return;
+	if (messages.empty()) return;
 
 	std::string im_text = messages.back()[LL_IM_TEXT].asString();
 	im_text.append(line);
@@ -534,7 +534,7 @@ std::string LLLogChat::oldLogFileName(std::string filename)
 		allfiles.push_back(scanResult);
 	}
 
-	if (allfiles.size() == 0)  // if no result from date search, return generic filename
+	if (allfiles.empty())  // if no result from date search, return generic filename
 	{
 		scanResult = directory + filename + '.' + LL_TRANSCRIPT_FILE_EXTENSION;
 	}
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 3d2f519c18..ecca7ee97f 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -114,7 +114,7 @@ void LLLoginInstance::connect(LLPointer<LLCredential> credentials)
 {
 	std::vector<std::string> uris;
 	LLGridManager::getInstance()->getLoginURIs(uris);
-    if (uris.size() < 1)
+    if (uris.empty())
     {
         LL_WARNS() << "Failed to get login URIs during connect. No connect for you!" << LL_ENDL;
         return;
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index 319cb9cee1..a56ebbd8fb 100644
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -195,7 +195,7 @@ public:
 	U32  getSLMStatus() const { return mMarketPlaceStatus; }
 	void setSLMStatus(U32 status);
     void getSLMListings();
-    bool isEmpty() { return (mMarketplaceItems.size() == 0); }
+    bool isEmpty() { return (mMarketplaceItems.empty()); }
     void setDataFetchedSignal(const status_updated_signal_t::slot_type& cb);
     void setSLMDataFetched(U32 status);
     U32 getSLMDataFetched() { return mMarketPlaceDataFetched; }
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 99de02b5aa..dd13c243c3 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -564,7 +564,7 @@ std::vector<LLMute> LLMuteList::getMutes() const
 //-----------------------------------------------------------------------------
 BOOL LLMuteList::loadFromFile(const std::string& filename)
 {
-	if(!filename.size())
+	if(filename.empty())
 	{
 		LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL;
 		return FALSE;
@@ -614,7 +614,7 @@ BOOL LLMuteList::loadFromFile(const std::string& filename)
 //-----------------------------------------------------------------------------
 BOOL LLMuteList::saveToFile(const std::string& filename)
 {
-	if(!filename.size())
+	if(filename.empty())
 	{
 		LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL;
 		return FALSE;
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 56271b0074..f744648d41 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1061,7 +1061,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
 		std::string description;
 		LLInventoryModel::item_array_t links =
 			LLAppearanceMgr::instance().findCOFItemLinks(mWearablePtr->getItemID());
-		if (links.size()>0)
+		if (!links.empty())
 		{
 			link_item = links.at(0).get();
 			if (link_item && link_item->getIsLinkType())
diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp
index 740fa24003..d788f41651 100644
--- a/indra/newview/llpanelgroupbulkban.cpp
+++ b/indra/newview/llpanelgroupbulkban.cpp
@@ -180,7 +180,7 @@ void LLPanelGroupBulkBan::submit()
 				banned_avatar_names.push_back(av_name);
 
 				banned_agent_list.erase(conflict);
-				if (banned_agent_list.size() == 0)
+				if (banned_agent_list.empty())
 				{
 					break;
 				}
@@ -203,17 +203,17 @@ void LLPanelGroupBulkBan::submit()
 	}
 
 	// sending request and ejecting members
-	if (banned_agent_list.size() != 0)
+	if (!banned_agent_list.empty())
 	{
 		LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mImplementation->mGroupID, LLGroupMgr::BAN_CREATE | LLGroupMgr::BAN_UPDATE, banned_agent_list);
 		LLGroupMgr::getInstance()->sendGroupMemberEjects(mImplementation->mGroupID, banned_agent_list);
 	}
 
 	// building notification
-	if (banned_avatar_names.size() > 0 || banning_self || out_of_limit_names.size() > 0)
+	if (!banned_avatar_names.empty() || banning_self || !out_of_limit_names.empty())
 	{
 		std::string reasons;
-		if(banned_avatar_names.size() > 0)
+		if(!banned_avatar_names.empty())
 		{
 			reasons = "\n " + buildResidentsArgument(banned_avatar_names, "residents_already_banned");
 		}
@@ -223,7 +223,7 @@ void LLPanelGroupBulkBan::submit()
 			reasons += "\n " + mImplementation->mCannotBanYourself;
 		}
 
-		if(out_of_limit_names.size() > 0)
+		if(!out_of_limit_names.empty())
 		{
 			reasons += "\n " + buildResidentsArgument(out_of_limit_names, "ban_limit_reached");
 		}
@@ -231,7 +231,7 @@ void LLPanelGroupBulkBan::submit()
 		LLStringUtil::format_map_t msg_args;
 		msg_args["[REASONS]"] = reasons;
 		LLSD msg;
-		if (banned_agent_list.size() == 0)
+		if (banned_agent_list.empty())
 		{
 			msg["MESSAGE"] = getString("ban_failed", msg_args);
 		}
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index f603851c98..3576041df6 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -576,7 +576,7 @@ void LLPanelGroupInvite::updateLists()
 			waiting = true;
 		}
 		if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete()
-			&& (gdatap->isRoleMemberDataComplete() || !gdatap->mMembers.size())) // MAINT-5270: large groups receives an empty members list without some powers, so RoleMemberData wouldn't be complete for them
+			&& (gdatap->isRoleMemberDataComplete() || gdatap->mMembers.empty())) // MAINT-5270: large groups receives an empty members list without some powers, so RoleMemberData wouldn't be complete for them
 		{
 			if ( mImplementation->mRoleNames )
 			{
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 4c2f645992..ea4f3a31ab 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1661,7 +1661,7 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
 		// Build a string with info on retrieval progress.
 		std::ostringstream retrieved;
 
-		if ( gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && !gdatap->mMembers.size() )
+		if ( gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && gdatap->mMembers.empty())
 		{
 			// MAINT-5237
 			retrieved << "Member list not available.";
@@ -1813,7 +1813,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
 		{
 			mMembersList->setEnabled(TRUE);
 		}
-		else if (gdatap->mMembers.size()) 
+		else if (!gdatap->mMembers.empty()) 
 		{
 			mMembersList->setEnabled(FALSE);
 			mMembersList->setCommentText(std::string("No match."));
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index e667730f89..3a9c9dee2e 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -282,7 +282,7 @@ void LLLandmarksPanel::updateVerbs()
 
 void LLLandmarksPanel::onSelectionChange(LLPlacesInventoryPanel* inventory_list, const std::deque<LLFolderViewItem*> &items, BOOL user_action)
 {
-	if (user_action && (items.size() > 0))
+	if (user_action && (!items.empty()))
 	{
 		deselectOtherThan(inventory_list);
 		mCurrentSelectedList = inventory_list;
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 4a68a51323..4002edad3d 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -992,7 +992,7 @@ void LLPanelLogin::onSelectUser()
 	{
 		// If the password exists in the credential, set the password field with a filler to get some stars
 		const auto authenticator = userCred->getAuthenticator();
-		if ( authenticator.isMap() && authenticator.has("secret") && authenticator["secret"].asString().size() > 0 )
+		if ( authenticator.isMap() && authenticator.has("secret") && !authenticator["secret"].asString().empty())
 		{
 			// This is a MD5 hex digest of a password.
 			// We don't actually use the password input field, 
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 6202782a26..531d684b27 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -522,7 +522,7 @@ void LLPanelMainInventory::onClearSearch()
 	}
 
 	// re-open folders that were initially open in case filter was active
-	if (mActivePanel && (mFilterSubString.size() || initially_active))
+	if (mActivePanel && (!mFilterSubString.empty() || initially_active))
 	{
 		mSavedFolderState->setApply(TRUE);
 		mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
@@ -1434,7 +1434,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
 			LLInventoryModel::cat_array_t* cat_array;
 			LLInventoryModel::item_array_t* item_array;
 			gInventory.getDirectDescendentsOf(item_id, cat_array, item_array);
-			status = (0 == cat_array->size() && 0 == item_array->size());
+			status = (cat_array->empty() && item_array->empty());
 		}
 		return status;
 	}
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 96224eea8c..764d69702d 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -216,7 +216,7 @@ void LLPanelMarketplaceInbox::onFilterEdit(const std::string& search_string)
 	if (mInventoryPanel)
 	{
 
-		if (search_string == "")
+		if (search_string.empty())
 		{
 			onClearSearch();
 		}
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 2a9e4398f4..5c51c1ccef 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -1037,7 +1037,7 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
 	bool nothing_selected = ids.empty();
 	bool one_selected = ids.size() == 1;
 	bool more_than_one_selected = ids.size() > 1;
-	bool is_dummy_item = (ids.size() && dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem()));
+	bool is_dummy_item = (!ids.empty() && dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem()));
 
 	// selected, expanded accordion tabs and selection in flat list view determine filtering when no item is selected in COF
 	// selection in flat list view participates in determining filtering because of EXT-7963
@@ -1407,7 +1407,7 @@ void LLPanelOutfitEdit::saveListSelection()
 	{
 		std::set<LLFolderViewItem*> selected_ids =    mInventoryItemsPanel->getRootFolder()->getSelectionList();
 
-		if(!selected_ids.size()) return;
+		if(selected_ids.empty()) return;
 
 		for (auto selected_id : selected_ids)
         {
@@ -1420,7 +1420,7 @@ void LLPanelOutfitEdit::saveListSelection()
 		std::vector<LLUUID> selected_ids;
 		mWearableItemsList->getSelectedUUIDs(selected_ids);
 
-		if(!selected_ids.size()) return;
+		if(selected_ids.empty()) return;
 
 		mInventoryItemsPanel->clearSelection();
 		LLFolderView* root = mInventoryItemsPanel->getRootFolder();
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index db10c15e69..ee82c0ab4b 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -875,7 +875,7 @@ void LLPanelPeople::updateButtons()
 	uuid_vec_t selected_uuids;
 	getCurrentItemIDs(selected_uuids);
 	bool item_selected = (selected_uuids.size() == 1);
-	bool multiple_selected = (selected_uuids.size() >= 1);
+	bool multiple_selected = (!selected_uuids.empty());
 
 	if (group_tab_active)
 	{
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 4cd735493c..642ae067fb 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -229,7 +229,7 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata)
 			return false;
 		}
 
-		bool result = (mUUIDs.size() > 0);
+		bool result = (!mUUIDs.empty());
 
 		uuid_vec_t::const_iterator
 			id = mUUIDs.begin(),
@@ -252,7 +252,7 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata)
 		// - there are selected people
 		// - and there are only friends among selection.
 
-		bool result = (mUUIDs.size() > 0);
+		bool result = (!mUUIDs.empty());
 
 		uuid_vec_t::const_iterator
 			id = mUUIDs.begin(),
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 96d2e8d7ff..d32468a186 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -193,7 +193,7 @@ LLPanelProfile::ChildStack::ChildStack()
 
 LLPanelProfile::ChildStack::~ChildStack()
 {
-	while (mStack.size() != 0)
+	while (!mStack.empty())
 	{
 		view_list_t& top = mStack.back();
 		for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it)
@@ -233,7 +233,7 @@ bool LLPanelProfile::ChildStack::push()
 /// Restore saved children (adding them back to the child list).
 bool LLPanelProfile::ChildStack::pop()
 {
-	if (mStack.size() == 0)
+	if (mStack.empty())
 	{
 		LL_WARNS() << "Empty stack" << LL_ENDL;
 		llassert(mStack.size() == 0);
@@ -256,7 +256,7 @@ bool LLPanelProfile::ChildStack::pop()
 void LLPanelProfile::ChildStack::preParentReshape()
 {
 	mSavedStack = mStack;
-	while(mStack.size() > 0)
+	while(!mStack.empty())
 	{
 		pop();
 	}
@@ -431,7 +431,7 @@ void LLPanelProfile::closePanel(LLPanel* panel)
 
 		// Prevent losing focus by the floater
 		const child_list_t* child_list = getChildList();
-		if (child_list->size() > 0)
+		if (!child_list->empty())
 		{
 			child_list->front()->setFocus(TRUE);
 		}
diff --git a/indra/newview/llpanelprofilelegacy.cpp b/indra/newview/llpanelprofilelegacy.cpp
index c4a0d4f8bb..8182b9e035 100644
--- a/indra/newview/llpanelprofilelegacy.cpp
+++ b/indra/newview/llpanelprofilelegacy.cpp
@@ -294,7 +294,7 @@ void LLPanelProfileLegacy::processProperties(void* data, EAvatarProcessorType ty
 			LLAvatarGroups* pData = static_cast<LLAvatarGroups*>(data);
 			if(!pData || getAvatarId() != pData->avatar_id) return;
 			
-			showAccordion("avatar_groups_tab", pData->group_list.size());
+			showAccordion("avatar_groups_tab", !pData->group_list.empty());
 			break;
 		}
 		// These are handled by their respective panels
@@ -559,7 +559,7 @@ void LLPanelProfileLegacy::closePanel(LLPanel* panel)
 		
 		// Prevent losing focus by the floater
 		const child_list_t* child_list = getChildList();
-		if (child_list->size() > 0)
+		if (!child_list->empty())
 		{
 			child_list->front()->setFocus(TRUE);
 		}
@@ -1356,7 +1356,7 @@ LLPanelProfileLegacy::ChildStack::ChildStack()
 
 LLPanelProfileLegacy::ChildStack::~ChildStack()
 {
-	while (mStack.size() != 0)
+	while (!mStack.empty())
 	{
 		view_list_t& top = mStack.back();
 		for (auto viewp : top)
@@ -1394,7 +1394,7 @@ bool LLPanelProfileLegacy::ChildStack::push()
 /// Restore saved children (adding them back to the child list).
 bool LLPanelProfileLegacy::ChildStack::pop()
 {
-	if (mStack.size() == 0)
+	if (mStack.empty())
 	{
 		LL_WARNS() << "Empty stack" << LL_ENDL;
 		llassert(mStack.size() == 0);
@@ -1416,7 +1416,7 @@ bool LLPanelProfileLegacy::ChildStack::pop()
 void LLPanelProfileLegacy::ChildStack::preParentReshape()
 {
 	mSavedStack = mStack;
-	while(mStack.size() > 0)
+	while(!mStack.empty())
 	{
 		pop();
 	}
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 0baba0ab54..790a28065c 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -835,7 +835,7 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
 	// Flat list for 'Today' (mItemContainers keeps accordion tabs in reverse order)
 	LLFlatListView* fv = nullptr;
 	
-	if (mItemContainers.size() > 0)
+	if (!mItemContainers.empty())
 	{
 		fv = getFlatListViewFromTab(mItemContainers[mItemContainers.size() - 1]);
 	}
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 1b6cfa367f..c17a94f2f7 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -863,7 +863,7 @@ bool LLPreviewNotecard::writeToFile(const std::string& filename)
 
     std::string utf8text = mEditor->getText();
 
-    if (utf8text.size() == 0)
+    if (utf8text.empty())
     {
         utf8text = " ";
     }
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 3dd69eb952..b000f2886b 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -649,7 +649,7 @@ bool LLScriptEdCore::writeToFile(const std::string& filename)
 	std::string utf8text = getScriptText();
 
 	// Special case for a completely empty script - stuff in one space so it can store properly.  See SL-46889
-	if (utf8text.size() == 0)
+	if (utf8text.empty())
 	{
 		utf8text = " ";
 	}
diff --git a/indra/newview/llrecentpeople.cpp b/indra/newview/llrecentpeople.cpp
index df03f5b152..8445924a14 100644
--- a/indra/newview/llrecentpeople.cpp
+++ b/indra/newview/llrecentpeople.cpp
@@ -181,7 +181,7 @@ bool LLRecentPeople::save() const
 	if (!file.is_open())
 		return false;
 	
-	for (const std::pair<LLUUID, LLSD> &item : mPeople)
+	for (auto const& item : mPeople)
 	{
 		if (item.second.has("nearby") && item.second["nearby"].asBoolean()) continue;
 		
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 565713f955..17cc76c9b5 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -413,7 +413,7 @@ void LLScreenChannel::loadStoredToastsToChannel()
 {
 	std::vector<ToastElem>::iterator it;
 
-	if(mStoredToastList.size() == 0)
+	if(mStoredToastList.empty())
 		return;
 
 	for(it = mStoredToastList.begin(); it != mStoredToastList.end(); ++it)
@@ -579,7 +579,7 @@ void LLScreenChannel::redrawToasts()
 		setFollows(FOLLOWS_ALL);
 	}
 
-	if(mToastList.size() == 0)
+	if(mToastList.empty())
 		return;
 
 	switch(mToastAlignment)
@@ -1033,7 +1033,7 @@ void LLScreenChannel::removeToastsFromChannel()
 //--------------------------------------------------------------------------
 void LLScreenChannel::removeAndStoreAllStorableToasts()
 {
-	if(mToastList.size() == 0)
+	if(mToastList.empty())
 		return;
 
 	hideToastsFromScreen();
@@ -1056,7 +1056,7 @@ void LLScreenChannel::removeAndStoreAllStorableToasts()
 //--------------------------------------------------------------------------
 void LLScreenChannel::removeToastsBySessionID(LLUUID id)
 {
-	if(mToastList.size() == 0)
+	if(mToastList.empty())
 		return;
 
 	hideToastsFromScreen();
diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp
index 611d2defa6..08a189f178 100644
--- a/indra/newview/llsearchcombobox.cpp
+++ b/indra/newview/llsearchcombobox.cpp
@@ -230,7 +230,7 @@ bool LLSearchHistoryBuilder::filterSearchHistory()
 			mFilteredSearchHistory.push_back(*it);
 	}
 
-	return mFilteredSearchHistory.size();
+	return !mFilteredSearchHistory.empty();
 }
 
 void LLSearchHistoryBuilder::buildSearchHistory()
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 85a085105f..50509e6793 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -444,7 +444,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(const std::vector<LLV
 	//clear primary object (no primary object)
 	mSelectedObjects->mPrimaryObject = NULL;
 
-	if (object_list.size() < 1)
+	if (object_list.empty())
 	{
 		return NULL;
 	}
@@ -2470,7 +2470,7 @@ void LLSelectMgr::packGodlikeHead(void* user_data)
 	// parameter list by not packing a string if there wasn't one
 	// specified. The object ids will be packed in the
 	// packObjectIDAsParam() method.
-	if(data->second.size() > 0)
+	if(!data->second.empty())
 	{
 		msg->nextBlock("ParamList");
 		msg->addString("Parameter", data->second);
@@ -5591,7 +5591,7 @@ void LLSelectMgr::updateSilhouettes()
 	std::vector<LLViewerObject*> changed_objects;
 
 	updateSelectionSilhouette(mSelectedObjects, num_sils_genned, changed_objects);
-	if (mRectSelectedObjects.size() > 0)
+	if (!mRectSelectedObjects.empty())
 	{
 		//gGLSPipelineSelection.set();
 
@@ -6433,7 +6433,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
 
 	BOOL is_hud_object = objectp->isHUDAttachment();
 	
-	if (mSilhouetteVertices.size() == 0 || mSilhouetteNormals.size() != mSilhouetteVertices.size())
+	if (mSilhouetteVertices.empty() || mSilhouetteNormals.size() != mSilhouetteVertices.size())
 	{
 		return;
 	}
@@ -7177,7 +7177,7 @@ LLSelectNode* LLObjectSelection::findNode(LLViewerObject* objectp)
 //-----------------------------------------------------------------------------
 BOOL LLObjectSelection::isEmpty() const
 {
-	return (mList.size() == 0);
+	return (mList.empty());
 }
 
 
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp
index ced972b8c6..cb4b55c013 100644
--- a/indra/newview/llskinningutil.cpp
+++ b/indra/newview/llskinningutil.cpp
@@ -293,7 +293,7 @@ void LLSkinningUtil::updateRiggingInfo(const LLMeshSkinInfo* skin, LLVOAvatar *a
     if (vol_face.mJointRiggingInfoTab.needsUpdate())
     {
         S32 num_verts = vol_face.mNumVertices;
-        if (num_verts>0 && vol_face.mWeights && (skin->mJointNames.size()>0))
+        if (num_verts>0 && vol_face.mWeights && (!skin->mJointNames.empty()))
         {
             initJointNums(const_cast<LLMeshSkinInfo*>(skin), avatar);
             if (vol_face.mJointRiggingInfoTab.size()==0)
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 81ce4ea921..d3e62748e7 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -210,7 +210,7 @@ LLSpeakersDelayActionsStorage::~LLSpeakersDelayActionsStorage()
 void LLSpeakersDelayActionsStorage::setActionTimer(const LLUUID& speaker_id)
 {
 	bool not_found = true;
-	if (mActionTimersMap.size() > 0)
+	if (!mActionTimersMap.empty())
 	{
 		not_found = mActionTimersMap.find(speaker_id) == mActionTimersMap.end();
 	}
@@ -228,7 +228,7 @@ void LLSpeakersDelayActionsStorage::setActionTimer(const LLUUID& speaker_id)
 
 void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id)
 {
-	if (mActionTimersMap.size() == 0) return;
+	if (mActionTimersMap.empty()) return;
 
 	LLSpeakerActionTimer::action_timer_iter_t it_speaker = mActionTimersMap.find(speaker_id);
 
@@ -263,7 +263,7 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_
 
 bool LLSpeakersDelayActionsStorage::isTimerStarted(const LLUUID& speaker_id)
 {
-	return (mActionTimersMap.size() > 0) && (mActionTimersMap.find(speaker_id) != mActionTimersMap.end());
+	return (!mActionTimersMap.empty()) && (mActionTimersMap.find(speaker_id) != mActionTimersMap.end());
 }
 
 //
@@ -529,7 +529,7 @@ void LLSpeakerMgr::updateSpeakerList()
                     mSpeakerListUpdated = true;
 				}
 			}
-			else if (mSpeakers.size() == 0)
+			else if (mSpeakers.empty())
 			{
 				// For all other session type (ad-hoc, P2P, avaline), we use the initial participants targets list
 				for (auto& target_id : session->mInitialTargetIDs)
@@ -590,7 +590,7 @@ bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id)
 LLPointer<LLSpeaker> LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id)
 {
 	//In some conditions map causes crash if it is empty(Windows only), adding check (EK)
-	if (mSpeakers.size() == 0)
+	if (mSpeakers.empty())
 		return nullptr;
 	speaker_map_t::iterator found_it = mSpeakers.find(speaker_id);
 	if (found_it == mSpeakers.end())
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index 32c830c5d1..23adc9ec13 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -705,7 +705,7 @@ BOOL LLSurface::idleUpdate(F32 max_update_time)
 
 	// If the Z height data has changed, we need to rebuild our
 	// property line vertex arrays.
-	if (mDirtyPatchList.size() > 0)
+	if (!mDirtyPatchList.empty())
 	{
 		getRegion()->dirtyHeights();
 	}
diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp
index c73a11f608..202734e926 100644
--- a/indra/newview/llteleporthistory.cpp
+++ b/indra/newview/llteleporthistory.cpp
@@ -144,10 +144,10 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
 		// while we already have a (loaded) non-empty history,
 		// there's no need to purge forward items or add a new item.
 
-		if (mGotInitialUpdate || mItems.size() == 0)
+		if (mGotInitialUpdate || mItems.empty())
 		{
 			// Purge forward items (if any).
-			if(mItems.size())
+			if(!mItems.empty())
 				mItems.erase (mItems.begin() + mCurrentItem + 1, mItems.end());
 			
 			// Append an empty item to the history and make it current.
@@ -190,7 +190,7 @@ void LLTeleportHistory::onHistoryChanged()
 
 void LLTeleportHistory::purgeItems()
 {
-	if (mItems.size() == 0) // no entries yet (we're called before login)
+	if (mItems.empty()) // no entries yet (we're called before login)
 	{
 		// If we don't return here the history will get into inconsistent state, hence:
 		// 1) updateCurrentLocation() will malfunction,
@@ -201,7 +201,7 @@ void LLTeleportHistory::purgeItems()
 		return;
 	}
 
-	if (mItems.size() > 0)
+	if (!mItems.empty())
 	{
 		mItems.erase(mItems.begin(), mItems.end()-1);
 	}
diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp
index f751d52eee..f75ed1cc70 100644
--- a/indra/newview/llteleporthistorystorage.cpp
+++ b/indra/newview/llteleporthistorystorage.cpp
@@ -85,7 +85,7 @@ void LLTeleportHistoryStorage::onTeleportHistoryChange()
 		return;
 
 	// Hacky sanity check. (EXT-6798)
-	if (th->getItems().size() == 0)
+	if (th->getItems().empty())
 	{
 		llassert(!"Inconsistent teleport history state");
 		return;
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 585a7e5d49..dc74611488 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1565,7 +1565,7 @@ void LLTextureCache::readHeaderCache()
 				}
 			}
 			
-			if (purge_list.size() > 0)
+			if (!purge_list.empty())
 			{
 				for (std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<unsigned int>>>::value_type iter :
                      purge_list)
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 9650e5f1c9..4a32220de6 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -105,7 +105,7 @@ public:
 	static void updateClass();
 	static void cleanupToasts();
 
-	static BOOL isAlertToastShown() { return sModalToastsList.size() > 0; }
+	static BOOL isAlertToastShown() { return !sModalToastsList.empty(); }
 
 	LLToast(const LLToast::Params& p);
 	virtual ~LLToast();
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index 7b8a8fdbdb..c3c9a95aef 100644
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -468,7 +468,7 @@ BOOL LLToolset::isToolSelected( S32 index )
 
 void LLToolset::selectFirstTool()
 {
-	mSelectedTool = (0 < mToolList.size()) ? mToolList[0] : NULL;
+	mSelectedTool = (!mToolList.empty()) ? mToolList[0] : NULL;
 	LLToolMgr::getInstance()->setCurrentTool( mSelectedTool );
 }
 
@@ -517,7 +517,7 @@ void LLToolset::selectPrevTool()
 		mSelectedTool = prev;
 		LLToolMgr::getInstance()->setCurrentTool( mSelectedTool );
 	}
-	else if (mToolList.size() > 0)
+	else if (!mToolList.empty())
 	{
 		selectToolByIndex((S32)mToolList.size()-1);
 	}
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index 82beadc878..d3ffcac40f 100644
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -365,7 +365,7 @@ bool LLGoogleTranslationHandler::parseTranslation(
 	}
 
 	const nlohmann::json &translations = data["translations"];
-	if (!translations.is_array() || translations.size() == 0)
+	if (!translations.is_array() || translations.empty())
 	{
 		return false;
 	}
diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp
index 777278f6f1..c984e14e4e 100644
--- a/indra/newview/llurlwhitelist.cpp
+++ b/indra/newview/llurlwhitelist.cpp
@@ -192,7 +192,7 @@ bool LLUrlWhiteList::addItem ( const std::string& itemIn, bool saveAfterAdd )
 //
 bool LLUrlWhiteList::getFirst ( std::string& valueOut )
 {
-	if ( mUrlList.size () == 0 )
+	if (mUrlList.empty())
 		return false;
 
 	mCurIndex = 0;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 3f6127e2be..04dfab56e6 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -891,7 +891,7 @@ bool LLViewerInventoryCategory::acceptItem(LLInventoryItem* inv_item)
             LLInventoryModel::item_array_t* item_array;
             gInventory.getDirectDescendentsOf(getUUID(),cat_array,item_array);
             // Destination stock folder must be empty OR types of incoming and existing items must be identical and have the same permissions
-            accept = (!item_array->size() ||
+            accept = (item_array->empty() ||
                       ((item_array->at(0)->getInventoryType() == inv_item->getInventoryType()) &&
                        (item_array->at(0)->getPermissions().getMaskNextOwner() == inv_item->getPermissions().getMaskNextOwner())));
         }
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp
index 630c93d9be..3e6dc9c7c9 100644
--- a/indra/newview/llviewerjointattachment.cpp
+++ b/indra/newview/llviewerjointattachment.cpp
@@ -302,7 +302,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
 			}
 		}
 	}
-	if (mAttachedObjects.size() == 0)
+	if (mAttachedObjects.empty())
 	{
 		mUpdateXform = FALSE;
 	}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2540ff3610..97e85f5847 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4396,7 +4396,7 @@ static void derez_objects(
 		error = "AcquireErrorTooManyObjects";
 	}
 
-	if(error.empty() && objectsp->size() > 0)
+	if(error.empty() && !objectsp->empty())
 	{
 		U8 d = (U8)dest;
 		LLUUID tid;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 03e9d0ad2e..530fd01b31 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -933,7 +933,7 @@ private:
 		LL_DEBUGS("Inventory_Move") << "Selected firstly: " << mSelectedItems.size()
 			<< ", now: " << selected_items.size() << ", difference: " << different_items.size() << LL_ENDL;
 
-		return different_items.size() > 0;
+		return !different_items.empty();
 	}
 
 	LLHandle<LLPanel> mActivePanel;
@@ -5863,7 +5863,7 @@ void process_teleport_failed(LLMessageSystem* msg, void**)
 		// Get the message ID
 		msg->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, message_id);
 		big_reason = LLAgent::sTeleportErrorMessages[message_id];
-		if ( big_reason.size() <= 0 )
+		if (big_reason.empty())
 		{
 			// Nothing found in the map - use what the server returned in the original message block
 			msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, big_reason);
@@ -5909,7 +5909,7 @@ void process_teleport_failed(LLMessageSystem* msg, void**)
 		msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, message_id);
 
 		big_reason = LLAgent::sTeleportErrorMessages[message_id];
-		if (big_reason.size() > 0)
+		if (!big_reason.empty())
 		{ // Substitute verbose reason from the local map
 			args["REASON"] = big_reason;
 		}
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 75532157fd..6d8326b77f 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -419,7 +419,7 @@ void LLViewerObject::markDead()
 		gObjectList.cleanupReferences(this);
 
 		LLViewerObject *childp;
-		while (mChildList.size() > 0)
+		while (!mChildList.empty())
 		{
 			childp = mChildList.back();
 			if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR)
@@ -3224,7 +3224,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
 			LLInventoryObject::object_list_t::iterator end = object->mInventory->end();
 			std::list<LLUUID>& pending_lst = object->mPendingInventoryItemsIDs;
 
-			for (; it != end && pending_lst.size(); ++it)
+			for (; it != end && !pending_lst.empty(); ++it)
 			{
 				LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(it->get());
 				if(item && item->getType() != LLAssetType::AT_CATEGORY)
@@ -3481,7 +3481,7 @@ void LLViewerObject::getInventoryContents(LLInventoryObject::object_list_t& obje
 
 LLInventoryObject* LLViewerObject::getInventoryRoot()
 {
-	if (!mInventory || !mInventory->size())
+	if (!mInventory || mInventory->empty())
 	{
 		return NULL;
 	}
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 1da4f439c2..edd2b84a13 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1728,7 +1728,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp)
 		}
 	}
 
-	if(dead_object_list.size() > 0)
+	if(!dead_object_list.empty())
 	{
 		LL_WARNS() << "There are " << dead_object_list.size() << " dead objects on the map!" << LL_ENDL ;
 
@@ -1737,7 +1737,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp)
 			cleanupReferences(iter) ;
 		}
 	}
-	if(region_object_list.size() > 0)
+	if(!region_object_list.empty())
 	{
 		LL_WARNS() << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << LL_ENDL ;
 
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 2cdba7e0b6..550cff4a44 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2678,7 +2678,7 @@ void LLViewerRegion::addCacheMissFull(const U32 local_id)
 
 void LLViewerRegion::requestCacheMisses()
 {
-	if (!mCacheMissList.size()) 
+	if (mCacheMissList.empty()) 
 	{
 		return;
 	}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 2af951d40f..386033ac36 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -5051,7 +5051,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
 		stop_glerror();
 
 		//unload shader's
-		while (LLGLSLShader::sInstances.size())
+		while (!LLGLSLShader::sInstances.empty())
 		{
 			LLGLSLShader* shader = *(LLGLSLShader::sInstances.begin());
 			shader->unload();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index c2b497cc7d..e90321f5a6 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3032,7 +3032,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
 	BOOL visible_avatar = isVisible() || mNeedsAnimUpdate;
 	static LLCachedControl<U32> nearby_chat_out(gSavedSettings, "AlchemyNearbyChatOutput");
 	BOOL visible_chat = (nearby_chat_out == E_NEARBY_OUTPUT_BUBBLE || nearby_chat_out == E_NEARBY_OUTPUT_BOTH) 
-		&& (mChats.size() || mTyping);
+		&& (!mChats.empty() || mTyping);
 	BOOL render_name =	visible_chat ||
 		(visible_avatar &&
 		 ((sRenderName == RENDER_NAME_ALWAYS) ||
@@ -3785,12 +3785,12 @@ void LLVOAvatar::updateDebugText()
         updateAnimationDebugText();
 	}
 
-	if (!mDebugText.size() && mText.notNull())
+	if (mDebugText.empty() && mText.notNull())
 	{
 		mText->markDead();
 		mText = nullptr;
 	}
-	else if (mDebugText.size())
+	else if (!mDebugText.empty())
 	{
 		setDebugText(mDebugText);
 	}
@@ -6003,7 +6003,7 @@ bool LLVOAvatar::getRiggedMeshID(LLViewerObject* pVO, LLUUID& mesh_id)
 			const LLMeshSkinInfo* pSkinData = pVObj->getSkinInfo();
 			if (pSkinData 
 				&& pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG	// full rig
-				&& pSkinData->mAlternateBindMatrix.size() > 0 )
+				&& !pSkinData->mAlternateBindMatrix.empty())
 					{				
 						mesh_id = pSkinData->mMeshID;
 						return true;
@@ -6400,7 +6400,7 @@ void LLVOAvatar::showAttachmentOverrides(bool verbose) const
 {
     std::set<std::string> pos_names, scale_names;
     getAttachmentOverrideNames(pos_names, scale_names);
-    if (pos_names.size())
+    if (!pos_names.empty())
     {
         std::stringstream ss;
         std::copy(pos_names.begin(), pos_names.end(), std::ostream_iterator<std::string>(ss, ","));
@@ -6410,7 +6410,7 @@ void LLVOAvatar::showAttachmentOverrides(bool verbose) const
     {
         LL_DEBUGS("Avatar") << getFullname() << " no attachment positions defined for any joints" << "\n" << LL_ENDL;
     }
-    if (scale_names.size())
+    if (!scale_names.empty())
     {
         std::stringstream ss;
         std::copy(scale_names.begin(), scale_names.end(), std::ostream_iterator<std::string>(ss, ","));
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 1f29a07d3c..a7600152d0 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2563,7 +2563,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
 
 					BOOL can_grab = FALSE;
 					LL_DEBUGS() << "item count for asset " << texture_id << ": " << items.size() << LL_ENDL;
-					if (items.size())
+					if (!items.empty())
 					{
 						// search for full permissions version
 						for (auto& item : items)
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index c9a09f6fe7..613bafea36 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -306,7 +306,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
 	
 	if (!sSpeciesTable.count(mSpecies))
 	{
-		if (sSpeciesTable.size())
+		if (!sSpeciesTable.empty())
 		{
 			SpeciesMap::const_iterator it = sSpeciesTable.begin();
 			mSpecies = (*it).first;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index ef4fc9e005..38a8fb7c07 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2377,7 +2377,7 @@ bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture)
 	//clear wait-list
 	mWaitingTextureInfo.erase(range.first, range.second);
 
-	return 0 != new_material.size();
+	return !new_material.empty();
 }
 
 bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture)
@@ -2456,7 +2456,7 @@ bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture)
 	//clear wait-list
 	mWaitingTextureInfo.erase(range.first, range.second);
 
-	return 0 != new_material.size();
+	return !new_material.empty();
 }
 
 S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
diff --git a/indra/newview/llwlanimator.cpp b/indra/newview/llwlanimator.cpp
index 20a184c9de..41602a932e 100644
--- a/indra/newview/llwlanimator.cpp
+++ b/indra/newview/llwlanimator.cpp
@@ -51,7 +51,7 @@ void LLWLAnimator::update(LLWLParamSet& curParams)
 	curTime = getDayTime();
 
 	// don't do anything if empty
-	if(mTimeTrack.size() == 0)
+	if(mTimeTrack.empty())
 	{
 		return;
 	}
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index df04b07a99..29684659bc 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1286,7 +1286,7 @@ CapUrlMatches LLWorld::getCapURLMatches(const std::string &cap_url)
     {
         std::set<std::string> new_url_capnames = regionp->getCapURLNames(cap_url);
 
-		if(new_url_capnames.size() > 0)
+		if(!new_url_capnames.empty())
 		{
 			url_capregions.insert(regionp);
 			url_capnames.insert(new_url_capnames.begin(), new_url_capnames.end());
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index aae24eaae2..814d797020 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -5164,7 +5164,7 @@ void LLPipeline::rebuildPools()
 
 	S32 max_count = mPools.size();
 	pool_set_t::iterator iter1 = mPools.upper_bound(mLastRebuildPool);
-	while(max_count > 0 && mPools.size() > 0) // && num_rebuilds < MAX_REBUILDS)
+	while(max_count > 0 && !mPools.empty()) // && num_rebuilds < MAX_REBUILDS)
 	{
 		if (iter1 == mPools.end())
 		{
-- 
GitLab