From f26f0330aa6c8f260626fffee2ad2a8664f4cd1b Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Mon, 6 May 2013 14:54:03 -0700
Subject: SH-4080 WIP interesting: random crash on Mac cleaning up more unused
 files

---
 indra/llprimitive/CMakeLists.txt  |  2 -
 indra/llprimitive/llvolumexml.cpp | 78 ---------------------------------------
 indra/llprimitive/llvolumexml.h   | 45 ----------------------
 3 files changed, 125 deletions(-)
 delete mode 100644 indra/llprimitive/llvolumexml.cpp
 delete mode 100644 indra/llprimitive/llvolumexml.h

(limited to 'indra/llprimitive')

diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index e4d9de7eb6..e404e01b91 100644
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -29,7 +29,6 @@ set(llprimitive_SOURCE_FILES
     lltextureentry.cpp
     lltreeparams.cpp
     llvolumemessage.cpp
-    llvolumexml.cpp
     material_codes.cpp
     )
 
@@ -47,7 +46,6 @@ set(llprimitive_HEADER_FILES
     lltreeparams.h
     lltree_common.h
     llvolumemessage.h
-    llvolumexml.h
     material_codes.h
     object_flags.h
     )
diff --git a/indra/llprimitive/llvolumexml.cpp b/indra/llprimitive/llvolumexml.cpp
deleted file mode 100644
index bf2297a029..0000000000
--- a/indra/llprimitive/llvolumexml.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/** 
- * @file llvolumexml.cpp
- * @brief LLVolumeXml base class
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#include "linden_common.h"
-
-#include "llvolumexml.h"
-
-//============================================================================
-
-// LLVolumeXml is just a wrapper class; all members are static
-
-//============================================================================
-
-LLPointer<LLXMLNode> LLVolumeXml::exportProfileParams(const LLProfileParams* params)
-{
-	LLPointer<LLXMLNode> ret = new LLXMLNode("profile", FALSE);
-
-	ret->createChild("curve_type", TRUE)->setByteValue(1, &params->getCurveType());
-	ret->createChild("interval", FALSE)->setFloatValue(2, &params->getBegin());
-	ret->createChild("hollow", FALSE)->setFloatValue(1, &params->getHollow());
-
-	return ret;
-}
-
-
-LLPointer<LLXMLNode> LLVolumeXml::exportPathParams(const LLPathParams* params)
-{
-	LLPointer<LLXMLNode> ret = new LLXMLNode("path", FALSE); 
-	ret->createChild("curve_type", TRUE)->setByteValue(1, &params->getCurveType());
-	ret->createChild("interval", FALSE)->setFloatValue(2, &params->getBegin());
-	ret->createChild("scale", FALSE)->setFloatValue(2, params->getScale().mV);
-	ret->createChild("shear", FALSE)->setFloatValue(2, params->getShear().mV);
-	ret->createChild("twist_interval", FALSE)->setFloatValue(2, &params->getTwistBegin());
-	ret->createChild("radius_offset", FALSE)->setFloatValue(1, &params->getRadiusOffset());
-	ret->createChild("taper", FALSE)->setFloatValue(2, params->getTaper().mV);
-	ret->createChild("revolutions", FALSE)->setFloatValue(1, &params->getRevolutions());
-	ret->createChild("skew", FALSE)->setFloatValue(1, &params->getSkew());
-
-	return ret;
-}
-
-
-LLPointer<LLXMLNode> LLVolumeXml::exportVolumeParams(const LLVolumeParams* params)
-{
-	LLPointer<LLXMLNode> ret = new LLXMLNode("shape", FALSE);
-	
-	LLPointer<LLXMLNode> node ;
-	node = exportPathParams(&params->getPathParams()) ;
-	node->setParent(ret);
-	node = exportProfileParams(&params->getProfileParams()) ;
-	node->setParent(ret);
-
-	return ret;
-}
-
diff --git a/indra/llprimitive/llvolumexml.h b/indra/llprimitive/llvolumexml.h
deleted file mode 100644
index 9d4d989475..0000000000
--- a/indra/llprimitive/llvolumexml.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/** 
- * @file llvolumexml.h
- * @brief LLVolumeXml base class
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLVOLUMEXML_H
-#define LL_LLVOLUMEXML_H
-
-#include "llvolume.h"
-#include "llxmlnode.h"
-
-// wrapper class for some volume/message functions
-class LLVolumeXml
-{
-public:
-	static LLPointer<LLXMLNode> exportProfileParams(const LLProfileParams* params);
-
-	static LLPointer<LLXMLNode> exportPathParams(const LLPathParams* params);
-
-	static LLPointer<LLXMLNode> exportVolumeParams(const LLVolumeParams* params);
-};
-
-#endif // LL_LLVOLUMEXML_H
-
-- 
cgit v1.2.3


From e40065f82c797eab41006a448c838f4f1089a2e8 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Fri, 19 Jul 2013 15:03:05 -0700
Subject: BUILDFIX: #include and dependency cleanup

---
 indra/llprimitive/llmaterialid.h | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra/llprimitive')

diff --git a/indra/llprimitive/llmaterialid.h b/indra/llprimitive/llmaterialid.h
index 0a95204085..b4c82d3b7b 100644
--- a/indra/llprimitive/llmaterialid.h
+++ b/indra/llprimitive/llmaterialid.h
@@ -30,6 +30,7 @@
 #define MATERIAL_ID_SIZE 16
 
 #include <string>
+#include "llsd.h"
 
 class LLMaterialID
 {
-- 
cgit v1.2.3


From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Tue, 30 Jul 2013 19:13:45 -0700
Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up
 build times consolidated most indra-specific constants in llcommon under
 indra_constants.h fixed issues with operations on mixed unit types (implicit
 and explicit) made LL_INFOS() style macros variadic in order to subsume other
 logging methods such as ll_infos added optional tag output to error recorders

---
 indra/llprimitive/CMakeLists.txt              |   1 +
 indra/llprimitive/lllslconstants.h            | 213 ++++++++++++++++++++++++++
 indra/llprimitive/llmaterialtable.cpp         |   2 +-
 indra/llprimitive/llprimitive.cpp             |   1 -
 indra/llprimitive/llprimitive.h               |  24 +--
 indra/llprimitive/tests/llmediaentry_test.cpp |   2 +-
 6 files changed, 228 insertions(+), 15 deletions(-)
 create mode 100755 indra/llprimitive/lllslconstants.h

(limited to 'indra/llprimitive')

diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index 8173083a85..d1475cf734 100755
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -42,6 +42,7 @@ set(llprimitive_HEADER_FILES
     CMakeLists.txt
 
     legacy_object_types.h
+    lllslconstants.h
     llmaterial.h
     llmaterialid.h
     llmaterialtable.h
diff --git a/indra/llprimitive/lllslconstants.h b/indra/llprimitive/lllslconstants.h
new file mode 100755
index 0000000000..9f32598e61
--- /dev/null
+++ b/indra/llprimitive/lllslconstants.h
@@ -0,0 +1,213 @@
+/** 
+ * @file lllslconstants.h
+ * @author James Cook
+ * @brief Constants used in lsl.
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ * 
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLLSLCONSTANTS_H
+#define LL_LLLSLCONSTANTS_H
+
+// LSL: Return flags for llGetAgentInfo
+const U32 AGENT_FLYING		= 0x0001;
+const U32 AGENT_ATTACHMENTS	= 0x0002;
+const U32 AGENT_SCRIPTED	= 0x0004;
+const U32 AGENT_MOUSELOOK	= 0x0008;
+const U32 AGENT_SITTING		= 0x0010;
+const U32 AGENT_ON_OBJECT	= 0x0020;
+const U32 AGENT_AWAY		= 0x0040;
+const U32 AGENT_WALKING		= 0x0080;
+const U32 AGENT_IN_AIR		= 0x0100;
+const U32 AGENT_TYPING		= 0x0200;
+const U32 AGENT_CROUCHING	= 0x0400;
+const U32 AGENT_BUSY		= 0x0800;
+const U32 AGENT_ALWAYS_RUN	= 0x1000;
+const U32 AGENT_AUTOPILOT	= 0x2000;
+
+const S32 LSL_REMOTE_DATA_CHANNEL		= 1;
+const S32 LSL_REMOTE_DATA_REQUEST		= 2;
+const S32 LSL_REMOTE_DATA_REPLY			= 3;
+
+// Constants used in extended LSL primitive setter and getters
+const S32 LSL_PRIM_TYPE_LEGACY	= 1; // No longer supported.
+const S32 LSL_PRIM_MATERIAL		= 2;
+const S32 LSL_PRIM_PHYSICS		= 3;
+const S32 LSL_PRIM_TEMP_ON_REZ	= 4;
+const S32 LSL_PRIM_PHANTOM		= 5;
+const S32 LSL_PRIM_POSITION		= 6;
+const S32 LSL_PRIM_SIZE			= 7;
+const S32 LSL_PRIM_ROTATION		= 8;
+const S32 LSL_PRIM_TYPE			= 9; // Replacement for LSL_PRIM_TYPE_LEGACY
+const S32 LSL_PRIM_TEXTURE		= 17;
+const S32 LSL_PRIM_COLOR		= 18;
+const S32 LSL_PRIM_BUMP_SHINY	= 19;
+const S32 LSL_PRIM_FULLBRIGHT	= 20;
+const S32 LSL_PRIM_FLEXIBLE		= 21;
+const S32 LSL_PRIM_TEXGEN		= 22;
+const S32 LSL_PRIM_POINT_LIGHT	= 23;
+const S32 LSL_PRIM_CAST_SHADOWS	= 24;
+const S32 LSL_PRIM_GLOW     	= 25;
+
+const S32 LSL_PRIM_TYPE_BOX		= 0;
+const S32 LSL_PRIM_TYPE_CYLINDER= 1;
+const S32 LSL_PRIM_TYPE_PRISM	= 2;
+const S32 LSL_PRIM_TYPE_SPHERE	= 3;
+const S32 LSL_PRIM_TYPE_TORUS	= 4;
+const S32 LSL_PRIM_TYPE_TUBE	= 5;
+const S32 LSL_PRIM_TYPE_RING	= 6;
+const S32 LSL_PRIM_TYPE_SCULPT  = 7;
+
+const S32 LSL_PRIM_HOLE_DEFAULT = 0x00;
+const S32 LSL_PRIM_HOLE_CIRCLE	= 0x10;
+const S32 LSL_PRIM_HOLE_SQUARE  = 0x20;
+const S32 LSL_PRIM_HOLE_TRIANGLE= 0x30;
+
+const S32 LSL_PRIM_MATERIAL_STONE	= 0;
+const S32 LSL_PRIM_MATERIAL_METAL	= 1;
+const S32 LSL_PRIM_MATERIAL_GLASS	= 2;
+const S32 LSL_PRIM_MATERIAL_WOOD	= 3;
+const S32 LSL_PRIM_MATERIAL_FLESH	= 4;
+const S32 LSL_PRIM_MATERIAL_PLASTIC	= 5;
+const S32 LSL_PRIM_MATERIAL_RUBBER	= 6;
+const S32 LSL_PRIM_MATERIAL_LIGHT	= 7;
+
+const S32 LSL_PRIM_SHINY_NONE		= 0;
+const S32 LSL_PRIM_SHINY_LOW		= 1;
+const S32 LSL_PRIM_SHINY_MEDIUM		= 2;
+const S32 LSL_PRIM_SHINY_HIGH		= 3;
+
+const S32 LSL_PRIM_TEXGEN_DEFAULT	= 0;
+const S32 LSL_PRIM_TEXGEN_PLANAR	= 1;
+
+const S32 LSL_PRIM_BUMP_NONE		= 0;
+const S32 LSL_PRIM_BUMP_BRIGHT		= 1;
+const S32 LSL_PRIM_BUMP_DARK		= 2;
+const S32 LSL_PRIM_BUMP_WOOD		= 3;
+const S32 LSL_PRIM_BUMP_BARK		= 4;
+const S32 LSL_PRIM_BUMP_BRICKS		= 5;
+const S32 LSL_PRIM_BUMP_CHECKER		= 6;
+const S32 LSL_PRIM_BUMP_CONCRETE	= 7;
+const S32 LSL_PRIM_BUMP_TILE		= 8;
+const S32 LSL_PRIM_BUMP_STONE		= 9;
+const S32 LSL_PRIM_BUMP_DISKS		= 10;
+const S32 LSL_PRIM_BUMP_GRAVEL		= 11;
+const S32 LSL_PRIM_BUMP_BLOBS		= 12;
+const S32 LSL_PRIM_BUMP_SIDING		= 13;
+const S32 LSL_PRIM_BUMP_LARGETILE	= 14;
+const S32 LSL_PRIM_BUMP_STUCCO		= 15;
+const S32 LSL_PRIM_BUMP_SUCTION		= 16;
+const S32 LSL_PRIM_BUMP_WEAVE		= 17;
+
+const S32 LSL_PRIM_SCULPT_TYPE_SPHERE   = 1;
+const S32 LSL_PRIM_SCULPT_TYPE_TORUS    = 2;
+const S32 LSL_PRIM_SCULPT_TYPE_PLANE    = 3;
+const S32 LSL_PRIM_SCULPT_TYPE_CYLINDER = 4;
+const S32 LSL_PRIM_SCULPT_TYPE_MASK     = 7;
+const S32 LSL_PRIM_SCULPT_FLAG_INVERT   = 64;
+const S32 LSL_PRIM_SCULPT_FLAG_MIRROR   = 128;
+
+const S32 LSL_ALL_SIDES				= -1;
+const S32 LSL_LINK_ROOT				= 1;
+const S32 LSL_LINK_FIRST_CHILD		= 2;
+const S32 LSL_LINK_SET				= -1;
+const S32 LSL_LINK_ALL_OTHERS		= -2;
+const S32 LSL_LINK_ALL_CHILDREN		= -3;
+const S32 LSL_LINK_THIS				= -4;
+
+// LSL constants for llSetForSell
+const S32 SELL_NOT			= 0;
+const S32 SELL_ORIGINAL		= 1;
+const S32 SELL_COPY			= 2;
+const S32 SELL_CONTENTS		= 3;
+
+// LSL constants for llSetPayPrice
+const S32 PAY_PRICE_HIDE = -1;
+const S32 PAY_PRICE_DEFAULT = -2;
+const S32 MAX_PAY_BUTTONS = 4;
+const S32 PAY_BUTTON_DEFAULT_0 = 1;
+const S32 PAY_BUTTON_DEFAULT_1 = 5;
+const S32 PAY_BUTTON_DEFAULT_2 = 10;
+const S32 PAY_BUTTON_DEFAULT_3 = 20;
+
+// lsl email registration.
+const S32 EMAIL_REG_SUBSCRIBE_OBJECT	= 0x01;
+const S32 EMAIL_REG_UNSUBSCRIBE_OBJECT	= 0x02;
+const S32 EMAIL_REG_UNSUBSCRIBE_SIM		= 0x04;
+
+const S32 LIST_STAT_RANGE = 0;
+const S32 LIST_STAT_MIN		= 1;
+const S32 LIST_STAT_MAX		= 2;
+const S32 LIST_STAT_MEAN	= 3;
+const S32 LIST_STAT_MEDIAN	= 4;
+const S32 LIST_STAT_STD_DEV	= 5;
+const S32 LIST_STAT_SUM = 6;
+const S32 LIST_STAT_SUM_SQUARES = 7;
+const S32 LIST_STAT_NUM_COUNT = 8;
+const S32 LIST_STAT_GEO_MEAN = 9;
+
+const S32 STRING_TRIM_HEAD = 0x01;
+const S32 STRING_TRIM_TAIL = 0x02;
+const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL;
+
+// llGetObjectDetails
+const S32 OBJECT_UNKNOWN_DETAIL = -1;
+const S32 OBJECT_NAME = 1;
+const S32 OBJECT_DESC = 2;
+const S32 OBJECT_POS = 3;
+const S32 OBJECT_ROT = 4;
+const S32 OBJECT_VELOCITY = 5;
+const S32 OBJECT_OWNER = 6;
+const S32 OBJECT_GROUP = 7;
+const S32 OBJECT_CREATOR = 8;
+
+// llTextBox() magic token string - yes this is a hack.  sue me.
+char const* const TEXTBOX_MAGIC_TOKEN = "!!llTextBox!!";
+
+// changed() event flags
+const U32	CHANGED_NONE = 0x0;
+const U32	CHANGED_INVENTORY = 0x1;
+const U32	CHANGED_COLOR = 0x2;
+const U32	CHANGED_SHAPE = 0x4;
+const U32	CHANGED_SCALE = 0x8;
+const U32	CHANGED_TEXTURE = 0x10;
+const U32	CHANGED_LINK = 0x20;
+const U32	CHANGED_ALLOWED_DROP = 0x40;
+const U32	CHANGED_OWNER = 0x80;
+const U32	CHANGED_REGION = 0x100;
+const U32	CHANGED_TELEPORT = 0x200;
+const U32	CHANGED_REGION_START = 0x400;
+const U32   CHANGED_MEDIA = 0x800;
+
+// Possible error results
+const U32 LSL_STATUS_OK                 = 0;
+const U32 LSL_STATUS_MALFORMED_PARAMS   = 1000;
+const U32 LSL_STATUS_TYPE_MISMATCH      = 1001;
+const U32 LSL_STATUS_BOUNDS_ERROR       = 1002;
+const U32 LSL_STATUS_NOT_FOUND          = 1003;
+const U32 LSL_STATUS_NOT_SUPPORTED      = 1004;
+const U32 LSL_STATUS_INTERNAL_ERROR     = 1999;
+
+// Start per-function errors below, starting at 2000:
+const U32 LSL_STATUS_WHITELIST_FAILED   = 2001;
+
+#endif
diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp
index b4539ebee9..4709e769c1 100755
--- a/indra/llprimitive/llmaterialtable.cpp
+++ b/indra/llprimitive/llmaterialtable.cpp
@@ -27,10 +27,10 @@
 #include "linden_common.h"
 
 #include "llmaterialtable.h"
+#include "indra_constants.h"
 #include "llstl.h"
 #include "material_codes.h"
 #include "sound_ids.h"
-#include "imageids.h"
 
 LLMaterialTable LLMaterialTable::basic(1);
 
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 2fa77177f5..1b4c68481f 100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -38,7 +38,6 @@
 #include "lldatapacker.h"
 #include "llsdutil_math.h"
 #include "llprimtexturelist.h"
-#include "imageids.h"
 #include "llmaterialid.h"
 
 /**
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 47a21beaaf..9edbbff34c 100755
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -540,7 +540,7 @@ void LLPrimitive::setPosition(const F32 x, const F32 y, const F32 z)
 	}
 	else
 	{
-		llerrs << "Non Finite in LLPrimitive::setPosition(x,y,z) for " << pCodeToString(mPrimitiveCode) << llendl;
+		LL_ERRS() << "Non Finite in LLPrimitive::setPosition(x,y,z) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
 	}
 }
 
@@ -553,7 +553,7 @@ void LLPrimitive::setPosition(const LLVector3& pos)
 	}
 	else
 	{
-		llerrs << "Non Finite in LLPrimitive::setPosition(LLVector3) for " << pCodeToString(mPrimitiveCode) << llendl;
+		LL_ERRS() << "Non Finite in LLPrimitive::setPosition(LLVector3) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
 	}
 }
 
@@ -565,7 +565,7 @@ void LLPrimitive::setAngularVelocity(const LLVector3& avel)
 	}
 	else
 	{
-		llerror("Non Finite in LLPrimitive::setAngularVelocity", 0);
+		LL_ERRS() << "Non Finite in LLPrimitive::setAngularVelocity" << LL_ENDL;
 	}
 }
 
@@ -577,7 +577,7 @@ void LLPrimitive::setAngularVelocity(const F32 x, const F32 y, const F32 z)
 	}
 	else
 	{
-		llerror("Non Finite in LLPrimitive::setAngularVelocity", 0);
+		LL_ERRS() << "Non Finite in LLPrimitive::setAngularVelocity" << LL_ENDL;
 	}
 }
 
@@ -589,7 +589,7 @@ void LLPrimitive::setVelocity(const LLVector3& vel)
 	}
 	else
 	{
-		llerrs << "Non Finite in LLPrimitive::setVelocity(LLVector3) for " << pCodeToString(mPrimitiveCode) << llendl;
+		LL_ERRS() << "Non Finite in LLPrimitive::setVelocity(LLVector3) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
 	}
 }
 
@@ -601,7 +601,7 @@ void LLPrimitive::setVelocity(const F32 x, const F32 y, const F32 z)
 	}
 	else
 	{
-		llerrs << "Non Finite in LLPrimitive::setVelocity(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << llendl;
+		LL_ERRS() << "Non Finite in LLPrimitive::setVelocity(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
 	}
 }
 
@@ -613,7 +613,7 @@ void LLPrimitive::setVelocityX(const F32 x)
 	}
 	else
 	{
-		llerror("Non Finite in LLPrimitive::setVelocityX", 0);
+		LL_ERRS() << "Non Finite in LLPrimitive::setVelocityX" << LL_ENDL;
 	}
 }
 
@@ -625,7 +625,7 @@ void LLPrimitive::setVelocityY(const F32 y)
 	}
 	else
 	{
-		llerror("Non Finite in LLPrimitive::setVelocityY", 0);
+		LL_ERRS() << "Non Finite in LLPrimitive::setVelocityY" << LL_ENDL;
 	}
 }
 
@@ -637,7 +637,7 @@ void LLPrimitive::setVelocityZ(const F32 z)
 	}
 	else
 	{
-		llerror("Non Finite in LLPrimitive::setVelocityZ", 0);
+		LL_ERRS() << "Non Finite in LLPrimitive::setVelocityZ" << LL_ENDL;
 	}
 }
 
@@ -649,7 +649,7 @@ void LLPrimitive::addVelocity(const LLVector3& vel)
 	}
 	else
 	{
-		llerror("Non Finite in LLPrimitive::addVelocity", 0);
+		LL_ERRS() << Non Finite in LLPrimitive::addVelocity" << LL_ENDL;
 	}
 }
 
@@ -661,7 +661,7 @@ void LLPrimitive::setAcceleration(const LLVector3& accel)
 	}
 	else
 	{
-		llerrs << "Non Finite in LLPrimitive::setAcceleration(LLVector3) for " << pCodeToString(mPrimitiveCode) << llendl;
+		LL_ERRS() << "Non Finite in LLPrimitive::setAcceleration(LLVector3) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
 	}
 }
 
@@ -673,7 +673,7 @@ void LLPrimitive::setAcceleration(const F32 x, const F32 y, const F32 z)
 	}
 	else
 	{
-		llerrs << "Non Finite in LLPrimitive::setAcceleration(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << llendl;
+		LL_ERRS() << "Non Finite in LLPrimitive::setAcceleration(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
 	}
 }
 #endif // CHECK_FOR_FINITE
diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp
index 16e5f894e2..b072ce3964 100755
--- a/indra/llprimitive/tests/llmediaentry_test.cpp
+++ b/indra/llprimitive/tests/llmediaentry_test.cpp
@@ -39,7 +39,7 @@
 #include "llsdserialize.h"
 
 #include "../llmediaentry.h"
-#include "lllslconstants.h"
+#include "indra_constants.h"
 
 #define DEFAULT_MEDIA_ENTRY "<llsd>\n\
  <map>\n\
-- 
cgit v1.2.3


From f87a49fad9aad163d0dcb98fa0ab571796d3fa7b Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Wed, 31 Jul 2013 11:49:34 -0700
Subject: BUILDFIX: bad quotes

---
 indra/llprimitive/llprimitive.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/llprimitive')

diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 9edbbff34c..cdb3f273c2 100755
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -649,7 +649,7 @@ void LLPrimitive::addVelocity(const LLVector3& vel)
 	}
 	else
 	{
-		LL_ERRS() << Non Finite in LLPrimitive::addVelocity" << LL_ENDL;
+		LL_ERRS() << "Non Finite in LLPrimitive::addVelocity" << LL_ENDL;
 	}
 }
 
-- 
cgit v1.2.3


From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Fri, 9 Aug 2013 17:11:19 -0700
Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new
 LL_INFOS(), LL_DEBUGS(), etc.

---
 indra/llprimitive/llmaterial.cpp        |  4 +--
 indra/llprimitive/llmaterialtable.cpp   |  4 +--
 indra/llprimitive/llmodel.cpp           | 32 +++++++++----------
 indra/llprimitive/llprimitive.cpp       | 30 +++++++++---------
 indra/llprimitive/llprimtexturelist.cpp |  2 +-
 indra/llprimitive/lltextureanim.cpp     |  4 +--
 indra/llprimitive/lltextureentry.cpp    |  4 +--
 indra/llprimitive/lltreeparams.cpp      |  2 +-
 indra/llprimitive/llvolumemessage.cpp   | 54 ++++++++++++++++-----------------
 9 files changed, 68 insertions(+), 68 deletions(-)

(limited to 'indra/llprimitive')

diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp
index cf4c645cfd..7f3c8da434 100644
--- a/indra/llprimitive/llmaterial.cpp
+++ b/indra/llprimitive/llmaterial.cpp
@@ -69,7 +69,7 @@ template<typename T> T getMaterialField(const LLSD& data, const std::string& fie
 	{
 		return (T)data[field];
 	}
-	llerrs << "Missing or mistyped field '" << field << "' in material definition" << llendl;
+	LL_ERRS() << "Missing or mistyped field '" << field << "' in material definition" << LL_ENDL;
 	return (T)LLSD();
 }
 
@@ -80,7 +80,7 @@ template<> LLUUID getMaterialField(const LLSD& data, const std::string& field, c
 	{
 		return data[field].asUUID();
 	}
-	llerrs << "Missing or mistyped field '" << field << "' in material definition" << llendl;
+	LL_ERRS() << "Missing or mistyped field '" << field << "' in material definition" << LL_ENDL;
 	return LLUUID::null;
 }
 
diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp
index 4709e769c1..37c718b4c6 100755
--- a/indra/llprimitive/llmaterialtable.cpp
+++ b/indra/llprimitive/llmaterialtable.cpp
@@ -547,14 +547,14 @@ LLUUID LLMaterialTable::getCollisionSoundUUID(U8 mcode, U8 mcode2)
 	mcode &= LL_MCODE_MASK;
 	mcode2 &= LL_MCODE_MASK;
 	
-	//llinfos << "code 1: " << ((U32) mcode) << " code 2:" << ((U32) mcode2) << llendl;
+	//LL_INFOS() << "code 1: " << ((U32) mcode) << " code 2:" << ((U32) mcode2) << LL_ENDL;
 	if (mCollisionSoundMatrix && (mcode < LL_MCODE_END) && (mcode2 < LL_MCODE_END))
 	{
 		return(mCollisionSoundMatrix[mcode * LL_MCODE_END + mcode2]);
 	}
 	else
 	{
-		//llinfos << "Null Sound" << llendl;
+		//LL_INFOS() << "Null Sound" << LL_ENDL;
 		return(SND_NULL);
 	}
 }
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 28ed051c55..e48613b8ca 100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -233,7 +233,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
 			verts.push_back(cv);
 			if (verts.size() >= 65535)
 			{
-				//llerrs << "Attempted to write model exceeding 16-bit index buffer limitation." << llendl;
+				//LL_ERRS() << "Attempted to write model exceeding 16-bit index buffer limitation." << LL_ENDL;
 				return LLModel::VERTEX_NUMBER_OVERFLOW ;
 			}
 			U16 index = (U16) (verts.size()-1);
@@ -437,7 +437,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
 				verts.push_back(cv);
 				if (verts.size() >= 65535)
 				{
-					//llerrs << "Attempted to write model exceeding 16-bit index buffer limitation." << llendl;
+					//LL_ERRS() << "Attempted to write model exceeding 16-bit index buffer limitation." << LL_ENDL;
 					return LLModel::VERTEX_NUMBER_OVERFLOW ;
 				}
 				U16 index = (U16) (verts.size()-1);
@@ -737,12 +737,12 @@ std::string LLModel::getStatusString(U32 status)
 	{
 		if(status_strings[status] == std::string())
 		{
-			llerrs << "No valid status string for this status: " << (U32)status << llendl ;
+			LL_ERRS() << "No valid status string for this status: " << (U32)status << LL_ENDL ;
 		}
 		return status_strings[status] ;
 	}
 
-	llerrs << "Invalid model status: " << (U32)status << llendl ;
+	LL_ERRS() << "Invalid model status: " << (U32)status << LL_ENDL ;
 
 	return std::string() ;
 }
@@ -818,7 +818,7 @@ BOOL LLModel::createVolumeFacesFromDomMesh(domMesh* mesh)
 	}
 	else
 	{	
-		llwarns << "no mesh found" << llendl;
+		LL_WARNS() << "no mesh found" << LL_ENDL;
 	}
 	
 	return FALSE;
@@ -1077,14 +1077,14 @@ void LLModel::addFace(const LLVolumeFace& face)
 {
 	if (face.mNumVertices == 0)
 	{
-		llerrs << "Cannot add empty face." << llendl;
+		LL_ERRS() << "Cannot add empty face." << LL_ENDL;
 	}
 
 	mVolumeFaces.push_back(face);
 
 	if (mVolumeFaces.size() > MAX_MODEL_FACES)
 	{
-		llerrs << "Model prims cannot have more than " << MAX_MODEL_FACES << " faces!" << llendl;
+		LL_ERRS() << "Model prims cannot have more than " << MAX_MODEL_FACES << " faces!" << LL_ENDL;
 	}
 }
 
@@ -1106,7 +1106,7 @@ void LLModel::generateNormals(F32 angle_cutoff)
 
 		if (vol_face.mNumIndices > 65535)
 		{
-			llwarns << "Too many vertices for normal generation to work." << llendl;
+			LL_WARNS() << "Too many vertices for normal generation to work." << LL_ENDL;
 			continue;
 		}
 
@@ -1706,7 +1706,7 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
 	{
 		if ((iter->first - pos).magVec() > 0.1f)
 		{
-			llerrs << "Couldn't find weight list." << llendl;
+			LL_ERRS() << "Couldn't find weight list." << LL_ENDL;
 		}
 
 		return iter->second;
@@ -1811,7 +1811,7 @@ bool LLModel::loadModel(std::istream& is)
 	{
 		if (!LLSDSerialize::fromBinary(header, is, 1024*1024*1024))
 		{
-			llwarns << "Mesh header parse error.  Not a valid mesh asset!" << llendl;
+			LL_WARNS() << "Mesh header parse error.  Not a valid mesh asset!" << LL_ENDL;
 			return false;
 		}
 	}
@@ -1841,7 +1841,7 @@ bool LLModel::loadModel(std::istream& is)
 	if (header[nm[lod]]["offset"].asInteger() == -1 || 
 		header[nm[lod]]["size"].asInteger() == 0 )
 	{ //cannot load requested LOD
-		llwarns << "LoD data is invalid!" << llendl;
+		LL_WARNS() << "LoD data is invalid!" << LL_ENDL;
 		return false;
 	}
 
@@ -1904,7 +1904,7 @@ bool LLModel::loadModel(std::istream& is)
 	}
 	else
 	{
-		llwarns << "unpackVolumeFaces failed!" << llendl;
+		LL_WARNS() << "unpackVolumeFaces failed!" << LL_ENDL;
 	}
 
 	return false;
@@ -1922,7 +1922,7 @@ bool LLModel::isMaterialListSubset( LLModel* ref )
 		
 		for (U32 dst = 0; dst < refCnt; ++dst)
 		{
-			//llinfos<<mMaterialList[src]<<" "<<ref->mMaterialList[dst]<<llendl;
+			//LL_INFOS()<<mMaterialList[src]<<" "<<ref->mMaterialList[dst]<<LL_ENDL;
 			foundRef = mMaterialList[src] == ref->mMaterialList[dst];									
 				
 			if ( foundRef )
@@ -1967,7 +1967,7 @@ bool LLModel::matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCn
 	bool isASubset = isMaterialListSubset( ref );
 	if ( !isASubset )
 	{
-		llinfos<<"Material of model is not a subset of reference."<<llendl;
+		LL_INFOS()<<"Material of model is not a subset of reference."<<LL_ENDL;
 		return false;
 	}
 	
@@ -2418,7 +2418,7 @@ LLSD LLModel::Decomposition::asLLSD() const
 
 				if (vert_idx > p.size())
 				{
-					llerrs << "Index out of bounds" << llendl;
+					LL_ERRS() << "Index out of bounds" << LL_ENDL;
 				}
 			}
 		}
@@ -2438,7 +2438,7 @@ void LLModel::Decomposition::merge(const LLModel::Decomposition* rhs)
 
 	if (mMeshID != rhs->mMeshID)
 	{
-		llerrs << "Attempted to merge with decomposition of some other mesh." << llendl;
+		LL_ERRS() << "Attempted to merge with decomposition of some other mesh." << LL_ENDL;
 	}
 
 	if (mBaseHull.empty())
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 1b4c68481f..a505ea04a7 100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -126,7 +126,7 @@ void LLPrimitive::setVolumeManager( LLVolumeMgr* volume_manager )
 {
 	if ( !volume_manager || sVolumeManager )
 	{
-		llerrs << "LLPrimitive::sVolumeManager attempting to be set to NULL or it already has been set." << llendl;
+		LL_ERRS() << "LLPrimitive::sVolumeManager attempting to be set to NULL or it already has been set." << LL_ENDL;
 	}
 	sVolumeManager = volume_manager;
 }
@@ -197,7 +197,7 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
 	}
 	else
 	{
-		llerrs << "primitive allocation failed" << llendl;
+		LL_ERRS() << "primitive allocation failed" << LL_ENDL;
 	}
 
 	return retval;
@@ -483,7 +483,7 @@ LLPCode LLPrimitive::legacyToPCode(const U8 legacy)
 		pcode = LL_PCODE_TREE_NEW;
 		break;
 	default:
-		llwarns << "Unknown legacy code " << legacy << " [" << (S32)legacy << "]!" << llendl;
+		LL_WARNS() << "Unknown legacy code " << legacy << " [" << (S32)legacy << "]!" << LL_ENDL;
 	}
 
 	return pcode;
@@ -578,7 +578,7 @@ U8 LLPrimitive::pCodeToLegacy(const LLPCode pcode)
 		legacy = TREE_NEW;
 		break;
 	default:
-		llwarns << "Unknown pcode " << (S32)pcode << ":" << pcode << "!" << llendl;
+		LL_WARNS() << "Unknown pcode " << (S32)pcode << ":" << pcode << "!" << LL_ENDL;
 		return 0;
 	}
 	return legacy;
@@ -586,7 +586,7 @@ U8 LLPrimitive::pCodeToLegacy(const LLPCode pcode)
 
 
 // static
-// Don't crash or llerrs here!  This function is used for debug strings.
+// Don't crash or LL_ERRS() here!  This function is used for debug strings.
 std::string LLPrimitive::pCodeToString(const LLPCode pcode)
 {
 	std::string pcode_string;
@@ -665,7 +665,7 @@ std::string LLPrimitive::pCodeToString(const LLPCode pcode)
 		}
 		else
 		{
-			llwarns << "Unknown base mask for pcode: " << base_code << llendl;
+			LL_WARNS() << "Unknown base mask for pcode: " << base_code << LL_ENDL;
 		}
 
 		U8 mask_code = pcode & (~LL_PCODE_BASE_MASK);
@@ -701,7 +701,7 @@ void LLPrimitive::copyTEs(const LLPrimitive *primitivep)
 	U32 i;
 	if (primitivep->getExpectedNumTEs() != getExpectedNumTEs())
 	{
-		llwarns << "Primitives don't have same expected number of TE's" << llendl;
+		LL_WARNS() << "Primitives don't have same expected number of TE's" << LL_ENDL;
 	}
 	U32 num_tes = llmin(primitivep->getExpectedNumTEs(), getExpectedNumTEs());
 	if (mTextureList.size() < getExpectedNumTEs())
@@ -803,7 +803,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
 		{
 			S32 te_index = face_index_from_id(cur_mask, old_faces);
 			old_tes.copyTexture(face_bit, *(getTE(te_index)));
-			//llinfos << face_bit << ":" << te_index << ":" << old_tes[face_bit].getID() << llendl;
+			//LL_INFOS() << face_bit << ":" << te_index << ":" << old_tes[face_bit].getID() << LL_ENDL;
 		}
 	}
 
@@ -823,7 +823,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
 
 	if (mVolumep->getNumFaces() == 0 && new_face_mask != 0)
 	{
-		llwarns << "Object with 0 faces found...INCORRECT!" << llendl;
+		LL_WARNS() << "Object with 0 faces found...INCORRECT!" << LL_ENDL;
 		setNumTEs(mVolumep->getNumFaces());
 		return TRUE;
 	}
@@ -881,7 +881,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
 				}
 				if (i == 4)
 				{
-					llwarns << "No path end or outer face in volume!" << llendl;
+					LL_WARNS() << "No path end or outer face in volume!" << LL_ENDL;
 				}
 				continue;
 			}
@@ -917,7 +917,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
 				}
 				if (i == 4)
 				{
-					llwarns << "No path end or outer face in volume!" << llendl;
+					LL_WARNS() << "No path end or outer face in volume!" << LL_ENDL;
 				}
 				continue;
 			}
@@ -943,8 +943,8 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
 		}
 		if (-1 == min_outer_bit)
 		{
-			llinfos << (LLVolume *)mVolumep << llendl;
-			llwarns << "Bad!  No outer faces, impossible!" << llendl;
+			LL_INFOS() << (LLVolume *)mVolumep << LL_ENDL;
+			LL_WARNS() << "Bad!  No outer faces, impossible!" << LL_ENDL;
 		}
 		face_mapping[face_bit] = min_outer_bit;
 	}
@@ -963,7 +963,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
 		{
 			if (-1 == face_mapping[face_bit])
 			{
-				llwarns << "No mapping from old face to new face!" << llendl;
+				LL_WARNS() << "No mapping from old face to new face!" << LL_ENDL;
 			}
 
 			S32 te_num = face_index_from_id(cur_mask, mVolumep->getProfile().mFaces);
@@ -1421,7 +1421,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
 	if (!dp.unpackBinaryData(packed_buffer, size, "TextureEntry"))
 	{
 		retval = TEM_INVALID;
-		llwarns << "Bad texture entry block!  Abort!" << llendl;
+		LL_WARNS() << "Bad texture entry block!  Abort!" << LL_ENDL;
 		return retval;
 	}
 
diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp
index 537e7a6695..dfae9699ec 100755
--- a/indra/llprimitive/llprimtexturelist.cpp
+++ b/indra/llprimitive/llprimtexturelist.cpp
@@ -130,7 +130,7 @@ S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry& te)
 	if (S32(index) >= mEntryList.size())
 	{
 		S32 current_size = mEntryList.size();
-		llwarns << "ignore copy of index = " << S32(index) << " into texture entry list of size = " << current_size << llendl;
+		LL_WARNS() << "ignore copy of index = " << S32(index) << " into texture entry list of size = " << current_size << LL_ENDL;
 		return TEM_CHANGE_NONE;
 	}
 
diff --git a/indra/llprimitive/lltextureanim.cpp b/indra/llprimitive/lltextureanim.cpp
index 185a3f69c0..031a315d62 100755
--- a/indra/llprimitive/lltextureanim.cpp
+++ b/indra/llprimitive/lltextureanim.cpp
@@ -125,7 +125,7 @@ void LLTextureAnim::unpackTAMessage(LLMessageSystem *mesgsys, const S32 block_nu
 	{
 		if (size)
 		{
-			llwarns << "Bad size " << size << " for TA block, ignoring." << llendl;
+			LL_WARNS() << "Bad size " << size << " for TA block, ignoring." << LL_ENDL;
 		}
 		mMode = 0;
 		return;
@@ -160,7 +160,7 @@ void LLTextureAnim::unpackTAMessage(LLDataPacker &dp)
 	{
 		if (size)
 		{
-			llwarns << "Bad size " << size << " for TA block, ignoring." << llendl;
+			LL_WARNS() << "Bad size " << size << " for TA block, ignoring." << LL_ENDL;
 		}
 		mMode = 0;
 		return;
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index 597f078490..56e79f16bc 100755
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -271,8 +271,8 @@ bool LLTextureEntry::fromLLSD(const LLSD& sd)
 	w = TEXTURE_MEDIA_DATA_KEY;
 	if (hasMedia() != sd.has(w))
 	{
-		llwarns << "LLTextureEntry::fromLLSD: media_flags (" << hasMedia() <<
-			") does not match presence of media_data (" << sd.has(w) << ").  Fixing." << llendl;
+		LL_WARNS() << "LLTextureEntry::fromLLSD: media_flags (" << hasMedia() <<
+			") does not match presence of media_data (" << sd.has(w) << ").  Fixing." << LL_ENDL;
 	}
 	updateMediaData(sd[w]);
 
diff --git a/indra/llprimitive/lltreeparams.cpp b/indra/llprimitive/lltreeparams.cpp
index 842d848217..19a6db20ae 100755
--- a/indra/llprimitive/lltreeparams.cpp
+++ b/indra/llprimitive/lltreeparams.cpp
@@ -40,7 +40,7 @@
 LLTreeParams::LLTreeParams()
 {
 
-//	llinfos << "TREE PARAMS INITIALIZED" << llendl;
+//	LL_INFOS() << "TREE PARAMS INITIALIZED" << LL_ENDL;
 	// init to basic something or other...
 	mShape = SR_TEND_FLAME;
 	mLevels = 1;
diff --git a/indra/llprimitive/llvolumemessage.cpp b/indra/llprimitive/llvolumemessage.cpp
index 58b23bebd2..a2c2666146 100755
--- a/indra/llprimitive/llvolumemessage.cpp
+++ b/indra/llprimitive/llvolumemessage.cpp
@@ -109,8 +109,8 @@ bool LLVolumeMessage::unpackProfileParams(
 	temp_f32 = temp_u16 * CUT_QUANTA;
 	if (temp_f32 > 1.f)
 	{
-		llwarns << "Profile begin out of range: " << temp_f32
-			<< ". Clamping to 0.0." << llendl;
+		LL_WARNS() << "Profile begin out of range: " << temp_f32
+			<< ". Clamping to 0.0." << LL_ENDL;
 		temp_f32 = 0.f;
 		ok = false;
 	}
@@ -120,8 +120,8 @@ bool LLVolumeMessage::unpackProfileParams(
 	temp_f32 = temp_u16 * CUT_QUANTA;
 	if (temp_f32 > 1.f)
 	{
-		llwarns << "Profile end out of range: " << 1.f - temp_f32
-			<< ". Clamping to 1.0." << llendl;
+		LL_WARNS() << "Profile end out of range: " << 1.f - temp_f32
+			<< ". Clamping to 1.0." << LL_ENDL;
 		temp_f32 = 1.f;
 		ok = false;
 	}
@@ -131,19 +131,19 @@ bool LLVolumeMessage::unpackProfileParams(
 	temp_f32 = temp_u16 * HOLLOW_QUANTA;
 	if (temp_f32 > 1.f)
 	{
-		llwarns << "Profile hollow out of range: " << temp_f32
-			<< ". Clamping to 0.0." << llendl;
+		LL_WARNS() << "Profile hollow out of range: " << temp_f32
+			<< ". Clamping to 0.0." << LL_ENDL;
 		temp_f32 = 0.f;
 		ok = false;
 	}
 	params->setHollow(temp_f32);
 
 	/*
-	llinfos << "Unpacking Profile Block " << block_num << llendl;
-	llinfos << "Curve:     " << (U32)getCurve() << llendl;
-	llinfos << "Begin:     " << getBegin() << llendl;
-	llinfos << "End:     " << getEnd() << llendl;
-	llinfos << "Hollow:     " << getHollow() << llendl;
+	LL_INFOS() << "Unpacking Profile Block " << block_num << LL_ENDL;
+	LL_INFOS() << "Curve:     " << (U32)getCurve() << LL_ENDL;
+	LL_INFOS() << "Begin:     " << getBegin() << LL_ENDL;
+	LL_INFOS() << "End:     " << getEnd() << LL_ENDL;
+	LL_INFOS() << "Hollow:     " << getHollow() << LL_ENDL;
 	*/
 	return ok;
 
@@ -165,8 +165,8 @@ bool LLVolumeMessage::unpackProfileParams(
 	temp_f32 = temp_u16 * CUT_QUANTA;
 	if (temp_f32 > 1.f)
 	{
-		llwarns << "Profile begin out of range: " << temp_f32 << llendl;
-		llwarns << "Clamping to 0.0" << llendl;
+		LL_WARNS() << "Profile begin out of range: " << temp_f32 << LL_ENDL;
+		LL_WARNS() << "Clamping to 0.0" << LL_ENDL;
 		temp_f32 = 0.f;
 		ok = false;
 	}
@@ -176,8 +176,8 @@ bool LLVolumeMessage::unpackProfileParams(
 	temp_f32 = temp_u16 * CUT_QUANTA;
 	if (temp_f32 > 1.f)
 	{
-		llwarns << "Profile end out of range: " << 1.f - temp_f32 << llendl;
-		llwarns << "Clamping to 1.0" << llendl;
+		LL_WARNS() << "Profile end out of range: " << 1.f - temp_f32 << LL_ENDL;
+		LL_WARNS() << "Clamping to 1.0" << LL_ENDL;
 		temp_f32 = 1.f;
 		ok = false;
 	}
@@ -187,8 +187,8 @@ bool LLVolumeMessage::unpackProfileParams(
 	temp_f32 = temp_u16 * HOLLOW_QUANTA;
 	if (temp_f32 > 1.f)
 	{
-		llwarns << "Profile hollow out of range: " << temp_f32 << llendl;
-		llwarns << "Clamping to 0.0" << llendl;
+		LL_WARNS() << "Profile hollow out of range: " << temp_f32 << LL_ENDL;
+		LL_WARNS() << "Clamping to 0.0" << LL_ENDL;
 		temp_f32 = 0.f;
 		ok = false;
 	}
@@ -379,12 +379,12 @@ bool LLVolumeMessage::unpackPathParams(
 	params->setSkew((F32)(skew * SCALE_QUANTA));
 
 /*
-	llinfos << "Unpacking Path Block " << block_num << llendl;
-	llinfos << "Curve:     " << (U32)params->getCurve() << llendl;
-	llinfos << "Begin:     " << params->getBegin() << llendl;
-	llinfos << "End:     " << params->getEnd() << llendl;
-	llinfos << "Scale:     " << params->getScale() << llendl;
-	llinfos << "Twist:     " << params->getTwist() << llendl;
+	LL_INFOS() << "Unpacking Path Block " << block_num << LL_ENDL;
+	LL_INFOS() << "Curve:     " << (U32)params->getCurve() << LL_ENDL;
+	LL_INFOS() << "Begin:     " << params->getBegin() << LL_ENDL;
+	LL_INFOS() << "End:     " << params->getEnd() << LL_ENDL;
+	LL_INFOS() << "Scale:     " << params->getScale() << LL_ENDL;
+	LL_INFOS() << "Twist:     " << params->getTwist() << LL_ENDL;
 */
 
 	return true;
@@ -480,16 +480,16 @@ bool LLVolumeMessage::constrainVolumeParams(LLVolumeParams& params)
 	bad |= params.setSkew(params.getPathParams().getSkew()) ? 0 : 0x800;
 	if(bad)
 	{
-		llwarns << "LLVolumeMessage::constrainVolumeParams() - "
+		LL_WARNS() << "LLVolumeMessage::constrainVolumeParams() - "
 				<< "forced to constrain incoming volume params: "
-				<< llformat("0x%04x",bad) << llendl;
+				<< llformat("0x%04x",bad) << LL_ENDL;
 	}
 	return bad ? false : true;
 }
 
 bool LLVolumeMessage::packVolumeParams(const LLVolumeParams* params, LLMessageSystem *mesgsys)
 {
-	// llinfos << "pack volume" << llendl;
+	// LL_INFOS() << "pack volume" << LL_ENDL;
 	if (params)
 	{
 		packPathParams(&params->getPathParams(), mesgsys);
@@ -505,7 +505,7 @@ bool LLVolumeMessage::packVolumeParams(const LLVolumeParams* params, LLMessageSy
 
 bool LLVolumeMessage::packVolumeParams(const LLVolumeParams* params, LLDataPacker &dp)
 {
-	// llinfos << "pack volume" << llendl;
+	// LL_INFOS() << "pack volume" << LL_ENDL;
 	if (params)
 	{
 		packPathParams(&params->getPathParams(), dp);
-- 
cgit v1.2.3


From d83c51a4e1923508e31f25576761f001d731ea93 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Wed, 14 Aug 2013 21:58:30 -0700
Subject: BUILDFIX: converted platform-specific files over to new LL_INFOS, etc
 macros

---
 indra/llprimitive/llprimlinkinfo.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'indra/llprimitive')

diff --git a/indra/llprimitive/llprimlinkinfo.h b/indra/llprimitive/llprimlinkinfo.h
index 82c50cfe2f..bee25975f1 100755
--- a/indra/llprimitive/llprimlinkinfo.h
+++ b/indra/llprimitive/llprimlinkinfo.h
@@ -274,28 +274,28 @@ S32 LLPrimLinkInfo< DATA_TYPE >::merge(LLPrimLinkInfo& other_info)
 //	other_info.computeBoundingSphere();
 //	if ( other_radius != other_info.mBoundingSphere.getRadius() )
 //	{
-//		llinfos << "Other bounding sphere changed!!" << llendl;
+//		LL_INFOS() << "Other bounding sphere changed!!" << LL_ENDL;
 //	}
 
 //	F32 this_radius = mBoundingSphere.getRadius();
 //	computeBoundingSphere();
 //	if ( this_radius != mBoundingSphere.getRadius() )
 //	{
-//		llinfos << "This bounding sphere changed!!" << llendl;
+//		LL_INFOS() << "This bounding sphere changed!!" << LL_ENDL;
 //	}
 
 
 	F32 max_span = get_max_linkable_span(mBoundingSphere, other_info.mBoundingSphere);
 
 	//  F32 center_dist = (mBoundingSphere.getCenter() - other_info.mBoundingSphere.getCenter()).length();
-	//	llinfos << "objects are " << center_dist << "m apart" << llendl;
+	//	LL_INFOS() << "objects are " << center_dist << "m apart" << LL_ENDL;
 	F32 span = get_span(mBoundingSphere, other_info.mBoundingSphere);
 
 	F32 span_limit = max_span + (2.f * other_info.mBoundingSphere.getRadius());
 	if (span > span_limit)
 	{
 		// there is no way any piece of other_info could link with this one
-		// llinfos << "span too large:  " << span << " vs. " << span_limit << llendl;
+		// LL_INFOS() << "span too large:  " << span << " vs. " << span_limit << LL_ENDL;
 		return 0;
 	}
 
-- 
cgit v1.2.3


From 27044252fc91fbc3f8da23e8728c992c1e7fd041 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 27 Jan 2014 16:09:07 -0600
Subject: MAINT-3661 Fix for crash when uploading corrupt .dae file.

---
 indra/llprimitive/llmodel.cpp | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

(limited to 'indra/llprimitive')

diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 34e0483a83..f82004395b 100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -170,6 +170,11 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
 		return LLModel::BAD_ELEMENT;
 	}
 
+	if (!pos_source)
+	{
+		llwarns << "Unable to process mesh without position data; invalid model;  invalid model." << llendl;
+		return LLModel::BAD_ELEMENT;
+	}
 	
 	domPRef p = tri->getP();
 	domListOfUInts& idx = p->getValue();
@@ -179,19 +184,22 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
 	domListOfFloats& tc = tc_source ? tc_source->getFloat_array()->getValue() : dummy ;
 	domListOfFloats& n = norm_source ? norm_source->getFloat_array()->getValue() : dummy ;
 
-	if (pos_source)
-	{
-		face.mExtents[0].set(v[0], v[1], v[2]);
-		face.mExtents[1].set(v[0], v[1], v[2]);
-	}
-	
 	LLVolumeFace::VertexMapData::PointMap point_map;
-	
+		
 	U32 index_count  = idx.getCount();
 	U32 vertex_count = pos_source  ? v.getCount()  : 0;
 	U32 tc_count     = tc_source   ? tc.getCount() : 0;
 	U32 norm_count   = norm_source ? n.getCount()  : 0;
 
+	if (vertex_count == 0)
+	{
+		llwarns << "Unable to process mesh with empty position array; invalid model." << llendl;
+		return LLModel::BAD_ELEMENT;
+	}
+
+	face.mExtents[0].set(v[0], v[1], v[2]);
+	face.mExtents[1].set(v[0], v[1], v[2]);
+	
 	for (U32 i = 0; i < index_count; i += idx_stride)
 	{
 		LLVolumeFace::VertexData cv;
-- 
cgit v1.2.3