diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-03-11 01:47:36 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-03-11 01:47:36 +0000 |
commit | 377ae59c21215473cf05e3cb8a86eb14c9e7715c (patch) | |
tree | a8cb48901c3c30bc1c2ddfd5d8b2d0cab7c6c95d /indra/llprimitive/llmaterialtable.cpp | |
parent | 9d12bd5e273b8cb032e25574461a8b4528d96343 (diff) |
merge Branch_1-19-1-Viewer -r 80930 : 81609 -> release
DEV-11202: Unhandled Excpetion in pipeline.cpp.
Merged over updated windlight ui help text from windlight14.
Reverting a const change in a virtual that was not propagated to all overrides.
DEV-10957 stop and pause Media and music buttons do not work
DEV-10762 Displayed page in the client browser disappears when crossing property boundaries.
DEV-11220 replace misspellings in alerts.xml parameters of 'messsage'
DEV-11221 fix a misspelling of 'participants' in floater_chat_history.xml tooltip
DEV-11193 clean up some viewer strings related to Windlight help text
svn merge -r81144:81147 svn+ssh://svn/svn/linden/branches/1-19-1-viewer-threads
DEV-11110 Media browser history dropdown does not save items across sessions
Ran the xuiparse -process tool on all en-us xml files. This does NOT change any data, merely reorders attributes and cleans up tab/spacing.
DEV-11349 XML CLEANUP: fix duplicate sibling names in en-us xui files
DEV-11348 Change to llmimetypes.cpp broke Media Type dropdown
dev-10623 "parcels that played movies no longer work in combo-merge-ui"
DEV-11379 - crash in LLTabContainer::draw()
DEV-11377 Elminiate dangerous LLLinkedList and LLDoubleLinkedList from newview
DEV-11158 sculpties on the top10 crash list
DEV-11404 "Send Current URL to Parcel" does not set the MIME type
merge 80958:80959 maint-ui-9-qa, DEV-11105 -- Searching for people with 3 characters like "j l" hurts the database.
DEV-10489: no draw distance cheating
DEV-879: water noise frequency
DEV-10764: macbook air support
DEV-10878: Linux Intel945 support
DEV-7551: featuretable adjustments for framerate.
DEV-11426 Enormous mini-map.
DEV-11505 - Crash in gunzip_file.
Removed final LinkedList, SkipMap, and AssocList templates from the Viewer!
DEV-11115 truncated word in the Advanced Water Editor's modal help dialog
Diffstat (limited to 'indra/llprimitive/llmaterialtable.cpp')
-rw-r--r-- | indra/llprimitive/llmaterialtable.cpp | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp index 9970a035d7..40cf97099c 100644 --- a/indra/llprimitive/llmaterialtable.cpp +++ b/indra/llprimitive/llmaterialtable.cpp @@ -32,6 +32,7 @@ #include "linden_common.h" #include "llmaterialtable.h" +#include "llstl.h" #include "material_codes.h" #include "sound_ids.h" #include "imageids.h" @@ -70,7 +71,8 @@ LLMaterialTable::~LLMaterialTable() mRollingSoundMatrix = NULL; } - mMaterialInfoList.deleteAllData(); + for_each(mMaterialInfoList.begin(), mMaterialInfoList.end(), DeletePointer()); + mMaterialInfoList.clear(); } void LLMaterialTable::initBasicTable() @@ -290,7 +292,7 @@ BOOL LLMaterialTable::add(U8 mcode, char* name, const LLUUID &uuid) // Add at the end so the order in menus matches the order in this // file. JNC 11.30.01 - mMaterialInfoList.addDataAtEnd(infop); + mMaterialInfoList.push_back(infop); return TRUE; } @@ -336,10 +338,10 @@ BOOL LLMaterialTable::addRollingSound(U8 mcode, U8 mcode2, const LLUUID &uuid) BOOL LLMaterialTable::addShatterSound(U8 mcode, const LLUUID &uuid) { - LLMaterialInfo *infop; - - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { infop->mShatterSoundID = uuid; @@ -352,10 +354,10 @@ BOOL LLMaterialTable::addShatterSound(U8 mcode, const LLUUID &uuid) BOOL LLMaterialTable::addDensity(U8 mcode, const F32 &density) { - LLMaterialInfo *infop; - - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { infop->mDensity = density; @@ -368,10 +370,10 @@ BOOL LLMaterialTable::addDensity(U8 mcode, const F32 &density) BOOL LLMaterialTable::addRestitution(U8 mcode, const F32 &restitution) { - LLMaterialInfo *infop; - - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { infop->mRestitution = restitution; @@ -384,10 +386,10 @@ BOOL LLMaterialTable::addRestitution(U8 mcode, const F32 &restitution) BOOL LLMaterialTable::addFriction(U8 mcode, const F32 &friction) { - LLMaterialInfo *infop; - - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { infop->mFriction = friction; @@ -400,10 +402,10 @@ BOOL LLMaterialTable::addFriction(U8 mcode, const F32 &friction) BOOL LLMaterialTable::addDamageAndEnergy(U8 mcode, const F32 &hp_mod, const F32 &damage_mod, const F32 &ep_mod) { - LLMaterialInfo *infop; - - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { infop->mHPModifier = hp_mod; @@ -418,10 +420,10 @@ BOOL LLMaterialTable::addDamageAndEnergy(U8 mcode, const F32 &hp_mod, const F32 LLUUID LLMaterialTable::getDefaultTextureID(char* name) { - LLMaterialInfo *infop; - - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (!strcmp(name, infop->mName)) { return infop->mDefaultTextureID; @@ -434,12 +436,11 @@ LLUUID LLMaterialTable::getDefaultTextureID(char* name) LLUUID LLMaterialTable::getDefaultTextureID(U8 mcode) { - LLMaterialInfo *infop; - mcode &= LL_MCODE_MASK; - - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { return infop->mDefaultTextureID; @@ -452,10 +453,10 @@ LLUUID LLMaterialTable::getDefaultTextureID(U8 mcode) U8 LLMaterialTable::getMCode(const char* name) { - LLMaterialInfo *infop; - - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (!strcmp(name, infop->mName)) { return infop->mMCode; @@ -468,12 +469,11 @@ U8 LLMaterialTable::getMCode(const char* name) char* LLMaterialTable::getName(U8 mcode) { - LLMaterialInfo *infop; - mcode &= LL_MCODE_MASK; - - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { return infop->mName; @@ -569,11 +569,11 @@ LLUUID LLMaterialTable::getGroundCollisionParticleUUID(U8 mcode) F32 LLMaterialTable::getDensity(U8 mcode) { - LLMaterialInfo *infop; - mcode &= LL_MCODE_MASK; - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { return infop->mDensity; @@ -585,11 +585,11 @@ F32 LLMaterialTable::getDensity(U8 mcode) F32 LLMaterialTable::getRestitution(U8 mcode) { - LLMaterialInfo *infop; - mcode &= LL_MCODE_MASK; - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { return infop->mRestitution; @@ -601,11 +601,11 @@ F32 LLMaterialTable::getRestitution(U8 mcode) F32 LLMaterialTable::getFriction(U8 mcode) { - LLMaterialInfo *infop; - mcode &= LL_MCODE_MASK; - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { return infop->mFriction; @@ -617,11 +617,11 @@ F32 LLMaterialTable::getFriction(U8 mcode) F32 LLMaterialTable::getHPMod(U8 mcode) { - LLMaterialInfo *infop; - mcode &= LL_MCODE_MASK; - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { return infop->mHPModifier; @@ -633,11 +633,11 @@ F32 LLMaterialTable::getHPMod(U8 mcode) F32 LLMaterialTable::getDamageMod(U8 mcode) { - LLMaterialInfo *infop; - mcode &= LL_MCODE_MASK; - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { return infop->mDamageModifier; @@ -649,11 +649,11 @@ F32 LLMaterialTable::getDamageMod(U8 mcode) F32 LLMaterialTable::getEPMod(U8 mcode) { - LLMaterialInfo *infop; - mcode &= LL_MCODE_MASK; - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { return infop->mEPModifier; @@ -665,11 +665,11 @@ F32 LLMaterialTable::getEPMod(U8 mcode) LLUUID LLMaterialTable::getShatterSoundUUID(U8 mcode) { - LLMaterialInfo *infop; - mcode &= LL_MCODE_MASK; - for (infop = mMaterialInfoList.getFirstData(); infop != NULL; infop = mMaterialInfoList.getNextData() ) + for (info_list_t::iterator iter = mMaterialInfoList.begin(); + iter != mMaterialInfoList.end(); ++iter) { + LLMaterialInfo *infop = *iter; if (mcode == infop->mMCode) { return infop->mShatterSoundID; |