[sldev] Building thee Mute Visibility patch on Linux

Able Whitman able.whitman at gmail.com
Fri Jul 20 13:04:31 PDT 2007


Skipped content of type multipart/alternative-------------- next part --------------
diff -urw -X '..\diff-excludes.txt' linden-aw41572\/indra/llprimitive/llprimitive.cpp linden\/indra/llprimitive/llprimitive.cpp
--- linden-aw41572\/indra/llprimitive/llprimitive.cpp	2007-07-20 15:39:32.359375000 -0400
+++ linden\/indra/llprimitive/llprimitive.cpp	2007-07-19 19:09:20.562500000 -0400
@@ -343,7 +343,7 @@
 
 		// pick the minimum between currrent alpha and the requested alpha, 
 		// in case the requested alpha is lower (e..g, for phantom prims)
-		color.setAlpha(min(mTextureList[te].getColor().mV[VALPHA], te_color.mV[VALPHA]));
+		color.setAlpha(llmin(mTextureList[te].getColor().mV[VALPHA], te_color.mV[VALPHA]));
 		if (color.mV[VALPHA] > mVisiblyMutedMaxAlpha)
 {
 			color.setAlpha(mVisiblyMutedMaxAlpha);
@@ -371,7 +371,7 @@
 		
 		// pick the minimum between the visibly muted max alpha and the
 		// requested alpha, in case the requested alpha is lower (e..g, for phantom prims)
-		color.setAlpha(min(mTextureList[te].getColor().mV[VALPHA], te_color.mV[VALPHA]));
+		color.setAlpha(llmin(mTextureList[te].getColor().mV[VALPHA], te_color.mV[VALPHA]));
 		if (color.mV[VALPHA] > mVisiblyMutedMaxAlpha)
 		{
 			color.setAlpha(mVisiblyMutedMaxAlpha); 
@@ -1815,7 +1815,7 @@
 		for (U32 i = 0; i < count; i++)
 		{
 			mTextureList[i].setColor(LLColor4::white);
-			mTextureList[i].setAlpha(min(mTextureList[i].getColor().mV[VALPHA], mVisiblyMutedMaxAlpha));
+			mTextureList[i].setAlpha(llmin(mTextureList[i].getColor().mV[VALPHA], mVisiblyMutedMaxAlpha));
 			mTextureList[i].setBumpShinyFullbright(0);
 			mTextureList[i].setID(IMG_DEFAULT);
 			mTextureList[i].setShiny(0);
@@ -1830,7 +1830,7 @@
 	LLTextureEntry new_te(te);
 
 	new_te.setColor(LLColor4::white);
-	new_te.setAlpha(min(te.getColor().mV[VALPHA], mVisiblyMutedMaxAlpha));
+	new_te.setAlpha(llmin(te.getColor().mV[VALPHA], mVisiblyMutedMaxAlpha));
 	new_te.setBumpShinyFullbright(0);
 	new_te.setID(IMG_DEFAULT);
 	new_te.setShiny(0);
diff -urw -X '..\diff-excludes.txt' linden-aw41572\/indra/newview/llmutelist.cpp linden\/indra/newview/llmutelist.cpp
--- linden-aw41572\/indra/newview/llmutelist.cpp	2007-07-20 15:39:32.421875000 -0400
+++ linden\/indra/newview/llmutelist.cpp	2007-07-20 12:53:41.031250000 -0400
@@ -1194,14 +1194,14 @@
 		return FALSE;
 	}
 
-	FILE* fp = LLFile::fopen(filename.c_str(), "rb");		/*Flawfinder: ignore*/
-	if (!fp)
+	std::ifstream fpin;
+	fpin.open(filename.c_str());
+	if (!fpin)
 	{
 		llwarns << "Couldn't open mute list " << filename << llendl;
 		return FALSE;
 	}
 
-	std::ifstream fpin(fp);
 	LLString line;
 	while (std::getline(fpin, line))
 	{
@@ -1256,7 +1256,7 @@
 	}
 	}
 
-	fclose(fp);
+	fpin.close();
 
 	// only clear once in a row
 	gSavedSettings.setBOOL("MuteListClearOnNextLogin", FALSE);
diff -urw -X '..\diff-excludes.txt' linden-aw41572\/indra/newview/llmutelist.h linden\/indra/newview/llmutelist.h
--- linden-aw41572\/indra/newview/llmutelist.h	2007-07-20 15:39:32.421875000 -0400
+++ linden\/indra/newview/llmutelist.h	2007-07-19 19:47:58.984375000 -0400
@@ -84,16 +84,15 @@
 {
 public:
 	LLParcelMute()
-		: mParcelID(0), mRegionHandle(0), mName("(unknown parcel)")
+		: mID(LLUUID::null), mDataID(LLUUID::null), mName("(unknown parcel)"),
+		  mParcelID(0), mRegionHandle(0), 
+		  mGlobalPosMin(LLVector3d::zero), mGlobalPosMax(LLVector3d::zero)
 	{
 		// in order to fake up parcel mute entries so they can be persisted,
 		// the parcel entry needs an LLUUID associated with it. since there's
 		// no meaningful LLUUID to use (ParcelProperties messages don't provide one),
 		// make a new random one 
-		mID = LLUUID::null;
 		mID.generate();
-
-		mDataID = LLUUID::null;
 	}
 
 	LLParcelMute(const LLParcelMute& parcelmute)
diff -urw -X '..\diff-excludes.txt' linden-aw41572\/indra/newview/llviewerobject.cpp linden\/indra/newview/llviewerobject.cpp
--- linden-aw41572\/indra/newview/llviewerobject.cpp	2007-07-20 15:39:32.515625000 -0400
+++ linden\/indra/newview/llviewerobject.cpp	2007-07-20 15:55:05.312500000 -0400
@@ -3549,7 +3549,7 @@
 			// don't make objects invisible unless they are already invisible, 
 			// since non-phantom objects will still collide with avatars even 
 			// if they are invisible
-			F32 mutealpha = min(mVisiblyMutedMaxAlpha, curcolor.mV[VALPHA]);
+			F32 mutealpha = llmin(mVisiblyMutedMaxAlpha, curcolor.mV[VALPHA]);
 
 			// make phantom objects entirely invisible, since avatars can walk through them
 			if (flagPhantom())


More information about the SLDev mailing list