diff options
Diffstat (limited to 'indra/llinventory')
-rwxr-xr-x | indra/llinventory/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | indra/llinventory/llcategory.h | 2 | ||||
-rwxr-xr-x | indra/llinventory/lleconomy.cpp | 44 | ||||
-rwxr-xr-x | indra/llinventory/lleconomy.h | 1 | ||||
-rwxr-xr-x | indra/llinventory/llfoldertype.cpp | 169 | ||||
-rwxr-xr-x | indra/llinventory/llfoldertype.h | 111 | ||||
-rwxr-xr-x | indra/llinventory/llinventory.cpp | 100 | ||||
-rwxr-xr-x | indra/llinventory/llinventory.h | 9 | ||||
-rwxr-xr-x | indra/llinventory/lllandmark.cpp | 20 | ||||
-rwxr-xr-x | indra/llinventory/llnotecard.cpp | 36 | ||||
-rwxr-xr-x | indra/llinventory/llparcel.cpp | 16 | ||||
-rwxr-xr-x | indra/llinventory/llpermissions.cpp | 30 | ||||
-rwxr-xr-x | indra/llinventory/llpermissions.h | 6 | ||||
-rwxr-xr-x | indra/llinventory/llsaleinfo.cpp | 12 | ||||
-rwxr-xr-x | indra/llinventory/lltransactionflags.cpp | 8 | ||||
-rwxr-xr-x | indra/llinventory/tests/inventorymisc_test.cpp | 12 |
16 files changed, 430 insertions, 148 deletions
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index e45c809e7e..0a1f93bd80 100755 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -19,6 +19,7 @@ include_directories( set(llinventory_SOURCE_FILES llcategory.cpp lleconomy.cpp + llfoldertype.cpp llinventory.cpp llinventorydefines.cpp llinventorytype.cpp @@ -36,6 +37,7 @@ set(llinventory_HEADER_FILES llcategory.h lleconomy.h + llfoldertype.h llinventory.h llinventorydefines.h llinventorytype.h diff --git a/indra/llinventory/llcategory.h b/indra/llinventory/llcategory.h index 19ce8fa89b..390a8a1f1e 100755 --- a/indra/llinventory/llcategory.h +++ b/indra/llinventory/llcategory.h @@ -43,7 +43,7 @@ // S32 count = LLCategory::none.getSubCategoryCount(); // for(S32 i = 0; i < count; i++) // { -// llinfos << none.getSubCategory(i).lookupNmae() << llendl; +// LL_INFOS() << none.getSubCategory(i).lookupNmae() << LL_ENDL; // } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/llinventory/lleconomy.cpp b/indra/llinventory/lleconomy.cpp index d643ea6ed9..e10402196f 100755 --- a/indra/llinventory/lleconomy.cpp +++ b/indra/llinventory/lleconomy.cpp @@ -101,7 +101,7 @@ void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* if (fakeprice_str) { S32 fakeprice = (S32)atoi(fakeprice_str); - llwarns << "LL_FAKE_UPLOAD_PRICE: Faking upload price as L$" << fakeprice << llendl; + LL_WARNS() << "LL_FAKE_UPLOAD_PRICE: Faking upload price as L$" << fakeprice << LL_ENDL; econ_data->setPriceUpload(fakeprice); } #endif @@ -143,19 +143,19 @@ S32 LLGlobalEconomy::calculateLightRent(const LLVector3& object_size) const void LLGlobalEconomy::print() { - llinfos << "Global Economy Settings: " << llendl; - llinfos << "Object Capacity: " << mObjectCapacity << llendl; - llinfos << "Object Count: " << mObjectCount << llendl; - llinfos << "Claim Price Per Object: " << mPriceObjectClaim << llendl; - llinfos << "Claim Price Per Public Object: " << mPricePublicObjectDecay << llendl; - llinfos << "Delete Price Per Public Object: " << mPricePublicObjectDelete << llendl; - llinfos << "Release Price Per Public Object: " << getPricePublicObjectRelease() << llendl; - llinfos << "Price Per Energy Unit: " << mPriceEnergyUnit << llendl; - llinfos << "Price Per Upload: " << mPriceUpload << llendl; - llinfos << "Light Base Price: " << mPriceRentLight << llendl; - llinfos << "Teleport Min Price: " << mTeleportMinPrice << llendl; - llinfos << "Teleport Price Exponent: " << mTeleportPriceExponent << llendl; - llinfos << "Price for group creation: " << mPriceGroupCreate << llendl; + LL_INFOS() << "Global Economy Settings: " << LL_ENDL; + LL_INFOS() << "Object Capacity: " << mObjectCapacity << LL_ENDL; + LL_INFOS() << "Object Count: " << mObjectCount << LL_ENDL; + LL_INFOS() << "Claim Price Per Object: " << mPriceObjectClaim << LL_ENDL; + LL_INFOS() << "Claim Price Per Public Object: " << mPricePublicObjectDecay << LL_ENDL; + LL_INFOS() << "Delete Price Per Public Object: " << mPricePublicObjectDelete << LL_ENDL; + LL_INFOS() << "Release Price Per Public Object: " << getPricePublicObjectRelease() << LL_ENDL; + LL_INFOS() << "Price Per Energy Unit: " << mPriceEnergyUnit << LL_ENDL; + LL_INFOS() << "Price Per Upload: " << mPriceUpload << LL_ENDL; + LL_INFOS() << "Light Base Price: " << mPriceRentLight << LL_ENDL; + LL_INFOS() << "Teleport Min Price: " << mTeleportMinPrice << LL_ENDL; + LL_INFOS() << "Teleport Price Exponent: " << mTeleportPriceExponent << LL_ENDL; + LL_INFOS() << "Price for group creation: " << mPriceGroupCreate << LL_ENDL; } LLRegionEconomy::LLRegionEconomy() @@ -209,8 +209,8 @@ void LLRegionEconomy::processEconomyDataRequest(LLMessageSystem *msg, void **use LLRegionEconomy *this_ptr = (LLRegionEconomy*)user_data; if (!this_ptr->hasData()) { - llwarns << "Dropping EconomyDataRequest, because EconomyData message " - << "has not been processed" << llendl; + LL_WARNS() << "Dropping EconomyDataRequest, because EconomyData message " + << "has not been processed" << LL_ENDL; } msg->newMessageFast(_PREHASH_EconomyData); @@ -254,12 +254,12 @@ void LLRegionEconomy::print() { this->LLGlobalEconomy::print(); - llinfos << "Region Economy Settings: " << llendl; - llinfos << "Land (square meters): " << mAreaTotal << llendl; - llinfos << "Owned Land (square meters): " << mAreaOwned << llendl; - llinfos << "Daily Object Rent: " << mPriceObjectRent << llendl; - llinfos << "Daily Land Rent (per meter): " << getPriceParcelRent() << llendl; - llinfos << "Energey Efficiency: " << mEnergyEfficiency << llendl; + LL_INFOS() << "Region Economy Settings: " << LL_ENDL; + LL_INFOS() << "Land (square meters): " << mAreaTotal << LL_ENDL; + LL_INFOS() << "Owned Land (square meters): " << mAreaOwned << LL_ENDL; + LL_INFOS() << "Daily Object Rent: " << mPriceObjectRent << LL_ENDL; + LL_INFOS() << "Daily Land Rent (per meter): " << getPriceParcelRent() << LL_ENDL; + LL_INFOS() << "Energey Efficiency: " << mEnergyEfficiency << LL_ENDL; } diff --git a/indra/llinventory/lleconomy.h b/indra/llinventory/lleconomy.h index eb2ecf71ba..47fcf688a2 100755 --- a/indra/llinventory/lleconomy.h +++ b/indra/llinventory/lleconomy.h @@ -27,6 +27,7 @@ #define LL_LLECONOMY_H #include "llsingleton.h" +#include <list> class LLMessageSystem; class LLVector3; diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp new file mode 100755 index 0000000000..8b568ea560 --- /dev/null +++ b/indra/llinventory/llfoldertype.cpp @@ -0,0 +1,169 @@ +/** + * @file llfoldertype.cpp + * @brief Implementatino of LLFolderType functionality. + * + * $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 "llfoldertype.h" +#include "lldictionary.h" +#include "llmemory.h" +#include "llsingleton.h" + +///---------------------------------------------------------------------------- +/// Class LLFolderType +///---------------------------------------------------------------------------- +struct FolderEntry : public LLDictionaryEntry +{ + FolderEntry(const std::string &type_name, // 8 character limit! + bool is_protected) // can the viewer change categories of this type? + : + LLDictionaryEntry(type_name), + mIsProtected(is_protected) + { + llassert(type_name.length() <= 8); + } + + const bool mIsProtected; +}; + +class LLFolderDictionary : public LLSingleton<LLFolderDictionary>, + public LLDictionary<LLFolderType::EType, FolderEntry> +{ +public: + LLFolderDictionary(); +protected: + virtual LLFolderType::EType notFound() const + { + return LLFolderType::FT_NONE; + } +}; + +LLFolderDictionary::LLFolderDictionary() +{ + // TYPE NAME PROTECTED + // |-----------|---------| + addEntry(LLFolderType::FT_TEXTURE, new FolderEntry("texture", TRUE)); + addEntry(LLFolderType::FT_SOUND, new FolderEntry("sound", TRUE)); + addEntry(LLFolderType::FT_CALLINGCARD, new FolderEntry("callcard", TRUE)); + addEntry(LLFolderType::FT_LANDMARK, new FolderEntry("landmark", TRUE)); + addEntry(LLFolderType::FT_CLOTHING, new FolderEntry("clothing", TRUE)); + addEntry(LLFolderType::FT_OBJECT, new FolderEntry("object", TRUE)); + addEntry(LLFolderType::FT_NOTECARD, new FolderEntry("notecard", TRUE)); + addEntry(LLFolderType::FT_ROOT_INVENTORY, new FolderEntry("root_inv", TRUE)); + addEntry(LLFolderType::FT_LSL_TEXT, new FolderEntry("lsltext", TRUE)); + addEntry(LLFolderType::FT_BODYPART, new FolderEntry("bodypart", TRUE)); + addEntry(LLFolderType::FT_TRASH, new FolderEntry("trash", TRUE)); + addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new FolderEntry("snapshot", TRUE)); + addEntry(LLFolderType::FT_LOST_AND_FOUND, new FolderEntry("lstndfnd", TRUE)); + addEntry(LLFolderType::FT_ANIMATION, new FolderEntry("animatn", TRUE)); + addEntry(LLFolderType::FT_GESTURE, new FolderEntry("gesture", TRUE)); + addEntry(LLFolderType::FT_FAVORITE, new FolderEntry("favorite", TRUE)); + + for (S32 ensemble_num = S32(LLFolderType::FT_ENSEMBLE_START); ensemble_num <= S32(LLFolderType::FT_ENSEMBLE_END); ensemble_num++) + { + addEntry(LLFolderType::EType(ensemble_num), new FolderEntry("ensemble", FALSE)); + } + + addEntry(LLFolderType::FT_CURRENT_OUTFIT, new FolderEntry("current", TRUE)); + addEntry(LLFolderType::FT_OUTFIT, new FolderEntry("outfit", FALSE)); + addEntry(LLFolderType::FT_MY_OUTFITS, new FolderEntry("my_otfts", TRUE)); + + addEntry(LLFolderType::FT_MESH, new FolderEntry("mesh", TRUE)); + + addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", FALSE)); + addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", FALSE)); + + addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE)); + + addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE)); +}; + +// static +LLFolderType::EType LLFolderType::lookup(const std::string& name) +{ + return LLFolderDictionary::getInstance()->lookup(name); +} + +// static +const std::string &LLFolderType::lookup(LLFolderType::EType folder_type) +{ + const FolderEntry *entry = LLFolderDictionary::getInstance()->lookup(folder_type); + if (entry) + { + return entry->mName; + } + else + { + return badLookup(); + } +} + +// static +// Only ensembles and plain folders aren't protected. "Protected" means +// you can't change certain properties such as their type. +bool LLFolderType::lookupIsProtectedType(EType folder_type) +{ + const LLFolderDictionary *dict = LLFolderDictionary::getInstance(); + const FolderEntry *entry = dict->lookup(folder_type); + if (entry) + { + return entry->mIsProtected; + } + return true; +} + +// static +bool LLFolderType::lookupIsEnsembleType(EType folder_type) +{ + return (folder_type >= FT_ENSEMBLE_START && + folder_type <= FT_ENSEMBLE_END); +} + +// static +LLAssetType::EType LLFolderType::folderTypeToAssetType(LLFolderType::EType folder_type) +{ + if (LLAssetType::lookup(LLAssetType::EType(folder_type)) == LLAssetType::badLookup()) + { + LL_WARNS() << "Converting to unknown asset type " << folder_type << LL_ENDL; + } + return (LLAssetType::EType)folder_type; +} + +// static +LLFolderType::EType LLFolderType::assetTypeToFolderType(LLAssetType::EType asset_type) +{ + if (LLFolderType::lookup(LLFolderType::EType(asset_type)) == LLFolderType::badLookup()) + { + LL_WARNS() << "Converting to unknown folder type " << asset_type << LL_ENDL; + } + return (LLFolderType::EType)asset_type; +} + +// static +const std::string &LLFolderType::badLookup() +{ + static const std::string sBadLookup = "llfoldertype_bad_lookup"; + return sBadLookup; +} diff --git a/indra/llinventory/llfoldertype.h b/indra/llinventory/llfoldertype.h new file mode 100755 index 0000000000..a0c847914f --- /dev/null +++ b/indra/llinventory/llfoldertype.h @@ -0,0 +1,111 @@ +/** + * @file llfoldertype.h + * @brief Declaration of LLFolderType. + * + * $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_LLFOLDERTYPE_H +#define LL_LLFOLDERTYPE_H + +#include <string> +#include "llassettype.h" + +// This class handles folder types (similar to assettype, except for folders) +// and operations on those. +class LL_COMMON_API LLFolderType +{ +public: + // ! BACKWARDS COMPATIBILITY ! Folder type enums must match asset type enums. + enum EType + { + FT_TEXTURE = 0, + + FT_SOUND = 1, + + FT_CALLINGCARD = 2, + + FT_LANDMARK = 3, + + FT_CLOTHING = 5, + + FT_OBJECT = 6, + + FT_NOTECARD = 7, + + FT_ROOT_INVENTORY = 8, + // We'd really like to change this to 9 since AT_CATEGORY is 8, + // but "My Inventory" has been type 8 for a long time. + + FT_LSL_TEXT = 10, + + FT_BODYPART = 13, + + FT_TRASH = 14, + + FT_SNAPSHOT_CATEGORY = 15, + + FT_LOST_AND_FOUND = 16, + + FT_ANIMATION = 20, + + FT_GESTURE = 21, + + FT_FAVORITE = 23, + + FT_ENSEMBLE_START = 26, + FT_ENSEMBLE_END = 45, + // This range is reserved for special clothing folder types. + + FT_CURRENT_OUTFIT = 46, + FT_OUTFIT = 47, + FT_MY_OUTFITS = 48, + + FT_MESH = 49, + + FT_INBOX = 50, + FT_OUTBOX = 51, + + FT_BASIC_ROOT = 52, + + FT_COUNT, + + FT_NONE = -1 + }; + + static EType lookup(const std::string& type_name); + static const std::string& lookup(EType folder_type); + + static bool lookupIsProtectedType(EType folder_type); + static bool lookupIsEnsembleType(EType folder_type); + + static LLAssetType::EType folderTypeToAssetType(LLFolderType::EType folder_type); + static LLFolderType::EType assetTypeToFolderType(LLAssetType::EType asset_type); + + static const std::string& badLookup(); // error string when a lookup fails + +protected: + LLFolderType() {} + ~LLFolderType() {} +}; + +#endif // LL_LLFOLDERTYPE_H diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 6336d02f22..11647c5518 100755 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -28,6 +28,7 @@ #include "llinventory.h" #include "lldbstrings.h" +#include "llfasttimer.h" #include "llinventorydefines.h" #include "llxorcipher.h" #include "llsd.h" @@ -72,17 +73,20 @@ const LLUUID MAGIC_ID("3c115e51-04f4-523c-9fa6-98aff1034730"); LLInventoryObject::LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid, LLAssetType::EType type, - const std::string& name) : + const std::string& name) +: LLTrace::MemTrackable<LLInventoryObject>("LLInventoryObject"), mUUID(uuid), mParentUUID(parent_uuid), mType(type), mName(name), mCreationDate(0) { + claimMem(mName); correctInventoryName(mName); } -LLInventoryObject::LLInventoryObject() : +LLInventoryObject::LLInventoryObject() +: LLTrace::MemTrackable<LLInventoryObject>("LLInventoryObject"), mType(LLAssetType::AT_NONE), mCreationDate(0) { @@ -97,7 +101,9 @@ void LLInventoryObject::copyObject(const LLInventoryObject* other) mUUID = other->mUUID; mParentUUID = other->mParentUUID; mType = other->mType; + disclaimMem(mName); mName = other->mName; + claimMem(mName); } const LLUUID& LLInventoryObject::getUUID() const @@ -150,7 +156,9 @@ void LLInventoryObject::rename(const std::string& n) correctInventoryName(new_name); if( !new_name.empty() && new_name != mName ) { + disclaimMem(mName); mName = new_name; + claimMem(mName); } } @@ -213,8 +221,8 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword '" << keyword - << "' in LLInventoryObject::importLegacyStream() for object " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in LLInventoryObject::importLegacyStream() for object " << mUUID << LL_ENDL; } } return TRUE; @@ -253,13 +261,13 @@ BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) co void LLInventoryObject::updateParentOnServer(BOOL) const { // don't do nothin' - llwarns << "LLInventoryObject::updateParentOnServer() called. Doesn't do anything." << llendl; + LL_WARNS() << "LLInventoryObject::updateParentOnServer() called. Doesn't do anything." << LL_ENDL; } void LLInventoryObject::updateServer(BOOL) const { // don't do nothin' - llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl; + LL_WARNS() << "LLInventoryObject::updateServer() called. Doesn't do anything." << LL_ENDL; } // static @@ -319,6 +327,8 @@ LLInventoryItem::LLInventoryItem(const LLUUID& uuid, LLStringUtil::replaceNonstandardASCII(mDescription, ' '); LLStringUtil::replaceChar(mDescription, '|', ' '); + claimMem(mDescription); + mPermissions.initMasks(inv_type); } @@ -350,7 +360,9 @@ void LLInventoryItem::copyItem(const LLInventoryItem* other) copyObject(other); mPermissions = other->mPermissions; mAssetUUID = other->mAssetUUID; + disclaimMem(mDescription); mDescription = other->mDescription; + claimMem(mDescription); mSaleInfo = other->mSaleInfo; mInventoryType = other->mInventoryType; mFlags = other->mFlags; @@ -397,23 +409,23 @@ U32 LLInventoryItem::getCRC32() const // *NOTE: We currently do not validate the name or description, // but if they change in transit, it's no big deal. U32 crc = mUUID.getCRC32(); - //lldebugs << "1 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "1 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mParentUUID.getCRC32(); - //lldebugs << "2 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "2 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mPermissions.getCRC32(); - //lldebugs << "3 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "3 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mAssetUUID.getCRC32(); - //lldebugs << "4 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "4 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mType; - //lldebugs << "5 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "5 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mInventoryType; - //lldebugs << "6 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "6 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mFlags; - //lldebugs << "7 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "7 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mSaleInfo.getCRC32(); - //lldebugs << "8 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "8 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += (U32)mCreationDate; - //lldebugs << "9 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "9 crc: " << std::hex << crc << std::dec << LL_ENDL; return crc; } @@ -430,7 +442,9 @@ void LLInventoryItem::setDescription(const std::string& d) LLInventoryItem::correctInventoryDescription(new_desc); if( new_desc != mDescription ) { + disclaimMem(mDescription); mDescription = new_desc; + claimMem(mDescription); } } @@ -575,13 +589,13 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 #ifdef CRC_CHECK if(local_crc == remote_crc) { - lldebugs << "crc matches" << llendl; + LL_DEBUGS() << "crc matches" << LL_ENDL; return TRUE; } else { - llwarns << "inventory crc mismatch: local=" << std::hex << local_crc - << " remote=" << remote_crc << std::dec << llendl; + LL_WARNS() << "inventory crc mismatch: local=" << std::hex << local_crc + << " remote=" << remote_crc << std::dec << LL_ENDL; return FALSE; } #else @@ -711,13 +725,15 @@ BOOL LLInventoryItem::importFile(LLFILE* fp) valuestr[0] = '\000'; } + disclaimMem(mDescription); mDescription.assign(valuestr); + claimMem(mDescription); LLStringUtil::replaceNonstandardASCII(mDescription, ' '); /* TODO -- ask Ian about this code const char *donkey = mDescription.c_str(); if (donkey[0] == '|') { - llerrs << "Donkey" << llendl; + LL_ERRS() << "Donkey" << LL_ENDL; } */ } @@ -729,8 +745,8 @@ BOOL LLInventoryItem::importFile(LLFILE* fp) } else { - llwarns << "unknown keyword '" << keyword - << "' in inventory import of item " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in inventory import of item " << mUUID << LL_ENDL; } } @@ -740,7 +756,7 @@ BOOL LLInventoryItem::importFile(LLFILE* fp) if((LLInventoryType::IT_NONE == mInventoryType) || !inventory_and_asset_types_match(mInventoryType, mType)) { - lldebugs << "Resetting inventory type for " << mUUID << llendl; + LL_DEBUGS() << "Resetting inventory type for " << mUUID << LL_ENDL; mInventoryType = LLInventoryType::defaultForAssetType(mType); } @@ -917,13 +933,15 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) valuestr[0] = '\000'; } + disclaimMem(mDescription); mDescription.assign(valuestr); LLStringUtil::replaceNonstandardASCII(mDescription, ' '); + claimMem(mDescription); /* TODO -- ask Ian about this code const char *donkey = mDescription.c_str(); if (donkey[0] == '|') { - llerrs << "Donkey" << llendl; + LL_ERRS() << "Donkey" << LL_ENDL; } */ } @@ -935,8 +953,8 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword '" << keyword - << "' in inventory import of item " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in inventory import of item " << mUUID << LL_ENDL; } } @@ -946,7 +964,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) if((LLInventoryType::IT_NONE == mInventoryType) || !inventory_and_asset_types_match(mInventoryType, mType)) { - lldebugs << "Resetting inventory type for " << mUUID << llendl; + LL_DEBUGS() << "Resetting inventory type for " << mUUID << LL_ENDL; mInventoryType = LLInventoryType::defaultForAssetType(mType); } @@ -1047,11 +1065,11 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate; } -LLFastTimer::DeclareTimer FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize"); +LLTrace::BlockTimerStatHandle FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize"); bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) { - LLFastTimer _(FTM_INVENTORY_SD_DESERIALIZE); + LL_RECORD_BLOCK_TIME(FTM_INVENTORY_SD_DESERIALIZE); if (is_new) { // If we're adding LLSD to an existing object, need avoid @@ -1168,8 +1186,10 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) w = INV_DESC_LABEL; if (sd.has(w)) { + disclaimMem(mDescription); mDescription = sd[w].asString(); LLStringUtil::replaceNonstandardASCII(mDescription, ' '); + claimMem(mDescription); } w = INV_CREATION_DATE_LABEL; if (sd.has(w)) @@ -1183,7 +1203,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) if((LLInventoryType::IT_NONE == mInventoryType) || !inventory_and_asset_types_match(mInventoryType, mType)) { - lldebugs << "Resetting inventory type for " << mUUID << llendl; + LL_DEBUGS() << "Resetting inventory type for " << mUUID << LL_ENDL; mInventoryType = LLInventoryType::defaultForAssetType(mType); } @@ -1256,7 +1276,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size) if (NULL == bin_bucket) { - llerrs << "unpackBinaryBucket failed. bin_bucket is NULL." << llendl; + LL_ERRS() << "unpackBinaryBucket failed. bin_bucket is NULL." << LL_ENDL; return; } @@ -1266,7 +1286,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size) item_buffer[bin_bucket_size] = '\0'; std::string str(&item_buffer[0]); - lldebugs << "item buffer: " << str << llendl; + LL_DEBUGS() << "item buffer: " << str << LL_ENDL; // Tokenize the string. typedef boost::tokenizer<boost::char_separator<char> > tokenizer; @@ -1303,7 +1323,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size) perm.init(creator_id, owner_id, last_owner_id, group_id); perm.initMasks(mask_base, mask_owner, mask_group, mask_every, mask_next); setPermissions(perm); - //lldebugs << "perm: " << perm << llendl; + //LL_DEBUGS() << "perm: " << perm << LL_ENDL; LLUUID asset_id((*(iter++)).c_str()); setAssetUUID(asset_id); @@ -1504,8 +1524,8 @@ BOOL LLInventoryCategory::importFile(LLFILE* fp) } else { - llwarns << "unknown keyword '" << keyword - << "' in inventory import category " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in inventory import category " << mUUID << LL_ENDL; } } return TRUE; @@ -1583,8 +1603,8 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword '" << keyword - << "' in inventory import category " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in inventory import category " << mUUID << LL_ENDL; } } return TRUE; @@ -1615,8 +1635,8 @@ LLSD ll_create_sd_from_inventory_item(LLPointer<LLInventoryItem> item) if(item.isNull()) return rv; if (item->getType() == LLAssetType::AT_NONE) { - llwarns << "ll_create_sd_from_inventory_item() for item with AT_NONE" - << llendl; + LL_WARNS() << "ll_create_sd_from_inventory_item() for item with AT_NONE" + << LL_ENDL; return rv; } rv[INV_ITEM_ID_LABEL] = item->getUUID(); @@ -1641,8 +1661,8 @@ LLSD ll_create_sd_from_inventory_category(LLPointer<LLInventoryCategory> cat) if(cat.isNull()) return rv; if (cat->getType() == LLAssetType::AT_NONE) { - llwarns << "ll_create_sd_from_inventory_category() for cat with AT_NONE" - << llendl; + LL_WARNS() << "ll_create_sd_from_inventory_category() for cat with AT_NONE" + << LL_ENDL; return rv; } rv[INV_FOLDER_ID_LABEL] = cat->getUUID(); diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index dd504fb155..443d34e145 100755 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -27,7 +27,6 @@ #ifndef LL_LLINVENTORY_H #define LL_LLINVENTORY_H -#include "lldarray.h" #include "llfoldertype.h" #include "llinventorytype.h" #include "llpermissions.h" @@ -35,6 +34,7 @@ #include "llsaleinfo.h" #include "llsd.h" #include "lluuid.h" +#include "lltrace.h" class LLMessageSystem; @@ -44,11 +44,10 @@ class LLMessageSystem; // Base class for anything in the user's inventory. Handles the common code // between items and categories. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLInventoryObject : public LLRefCount +class LLInventoryObject : public LLRefCount, public LLTrace::MemTrackable<LLInventoryObject> { public: typedef std::list<LLPointer<LLInventoryObject> > object_list_t; - typedef std::list<LLConstPointer<LLInventoryObject> > const_object_list_t; //-------------------------------------------------------------------- // Initialization @@ -122,7 +121,7 @@ protected: class LLInventoryItem : public LLInventoryObject { public: - typedef LLDynamicArray<LLPointer<LLInventoryItem> > item_array_t; + typedef std::vector<LLPointer<LLInventoryItem> > item_array_t; //-------------------------------------------------------------------- // Initialization @@ -234,7 +233,7 @@ protected: class LLInventoryCategory : public LLInventoryObject { public: - typedef LLDynamicArray<LLPointer<LLInventoryCategory> > cat_array_t; + typedef std::vector<LLPointer<LLInventoryCategory> > cat_array_t; //-------------------------------------------------------------------- // Initialization diff --git a/indra/llinventory/lllandmark.cpp b/indra/llinventory/lllandmark.cpp index 493909cf9c..4c6075d6b5 100755 --- a/indra/llinventory/lllandmark.cpp +++ b/indra/llinventory/lllandmark.cpp @@ -128,7 +128,7 @@ LLLandmark* LLLandmark::constructFromString(const char *buffer) goto error; } cur += chars_read; - // llinfos << "Landmark read: " << pos << llendl; + // LL_INFOS() << "Landmark read: " << pos << LL_ENDL; return new LLLandmark(pos); } @@ -155,7 +155,7 @@ LLLandmark* LLLandmark::constructFromString(const char *buffer) } error: - llinfos << "Bad Landmark Asset: bad _DATA_ block." << llendl; + LL_INFOS() << "Bad Landmark Asset: bad _DATA_ block." << LL_ENDL; return NULL; } @@ -176,7 +176,7 @@ void LLLandmark::requestRegionHandle( if(region_id.isNull()) { // don't bother with checking - it's 0. - lldebugs << "requestRegionHandle: null" << llendl; + LL_DEBUGS() << "requestRegionHandle: null" << LL_ENDL; if(callback) { const U64 U64_ZERO = 0; @@ -187,7 +187,7 @@ void LLLandmark::requestRegionHandle( { if(region_id == mLocalRegion.first) { - lldebugs << "requestRegionHandle: local" << llendl; + LL_DEBUGS() << "requestRegionHandle: local" << LL_ENDL; if(callback) { callback(region_id, mLocalRegion.second); @@ -198,14 +198,14 @@ void LLLandmark::requestRegionHandle( region_map_t::iterator it = mRegions.find(region_id); if(it == mRegions.end()) { - lldebugs << "requestRegionHandle: upstream" << llendl; + LL_DEBUGS() << "requestRegionHandle: upstream" << LL_ENDL; if(callback) { region_callback_map_t::value_type vt(region_id, callback); sRegionCallbackMap.insert(vt); } - lldebugs << "Landmark requesting information about: " - << region_id << llendl; + LL_DEBUGS() << "Landmark requesting information about: " + << region_id << LL_ENDL; msg->newMessage("RegionHandleRequest"); msg->nextBlock("RequestBlock"); msg->addUUID("RegionID", region_id); @@ -214,7 +214,7 @@ void LLLandmark::requestRegionHandle( else if(callback) { // we have the answer locally - just call the callack. - lldebugs << "requestRegionHandle: ready" << llendl; + LL_DEBUGS() << "requestRegionHandle: ready" << LL_ENDL; callback(region_id, (*it).second.mRegionHandle); } } @@ -248,8 +248,8 @@ void LLLandmark::processRegionIDAndHandle(LLMessageSystem* msg, void**) #if LL_DEBUG U32 grid_x, grid_y; grid_from_region_handle(info.mRegionHandle, &grid_x, &grid_y); - lldebugs << "Landmark got reply for region: " << region_id << " " - << grid_x << "," << grid_y << llendl; + LL_DEBUGS() << "Landmark got reply for region: " << region_id << " " + << grid_x << "," << grid_y << LL_ENDL; #endif // make all the callbacks here. diff --git a/indra/llinventory/llnotecard.cpp b/indra/llinventory/llnotecard.cpp index 69152cefe0..908c647498 100755 --- a/indra/llinventory/llnotecard.cpp +++ b/indra/llinventory/llnotecard.cpp @@ -57,33 +57,33 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "LLEmbeddedItems version" >> mEmbeddedVersion >> "\n"; if (str.fail()) { - llwarns << "Invalid Linden text file header" << llendl; + LL_WARNS() << "Invalid Linden text file header" << LL_ENDL; goto import_file_failed; } if( 1 != mEmbeddedVersion ) { - llwarns << "Invalid LLEmbeddedItems version: " << mEmbeddedVersion << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems version: " << mEmbeddedVersion << LL_ENDL; goto import_file_failed; } str >> std::ws >> "{\n"; if(str.fail()) { - llwarns << "Invalid Linden text file format: missing {" << llendl; + LL_WARNS() << "Invalid Linden text file format: missing {" << LL_ENDL; goto import_file_failed; } str >> std::ws >> "count " >> count >> "\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems count" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems count" << LL_ENDL; goto import_file_failed; } if((count < 0)) { - llwarns << "Invalid LLEmbeddedItems count value: " << count << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems count value: " << count << LL_ENDL; goto import_file_failed; } @@ -92,7 +92,7 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "{\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing {" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing {" << LL_ENDL; goto import_file_failed; } @@ -100,21 +100,21 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "ext char index " >> index >> "\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing ext char index" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing ext char index" << LL_ENDL; goto import_file_failed; } str >> std::ws >> "inv_item\t0\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing inv_item" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing inv_item" << LL_ENDL; goto import_file_failed; } LLPointer<LLInventoryItem> item = new LLInventoryItem; if (!item->importLegacyStream(str)) { - llinfos << "notecard import failed" << llendl; + LL_INFOS() << "notecard import failed" << LL_ENDL; goto import_file_failed; } mItems.push_back(item); @@ -122,7 +122,7 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "}\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing }" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing }" << LL_ENDL; goto import_file_failed; } } @@ -130,7 +130,7 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "}\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing }" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing }" << LL_ENDL; goto import_file_failed; } @@ -161,20 +161,20 @@ bool LLNotecard::importStream(std::istream& str) str >> std::ws >> "Linden text version " >> mVersion >> "\n"; if(str.fail()) { - llwarns << "Invalid Linden text file header " << llendl; + LL_WARNS() << "Invalid Linden text file header " << LL_ENDL; return FALSE; } if( 1 != mVersion && 2 != mVersion) { - llwarns << "Invalid Linden text file version: " << mVersion << llendl; + LL_WARNS() << "Invalid Linden text file version: " << mVersion << LL_ENDL; return FALSE; } str >> std::ws >> "{\n"; if(str.fail()) { - llwarns << "Invalid Linden text file format" << llendl; + LL_WARNS() << "Invalid Linden text file format" << LL_ENDL; return FALSE; } @@ -187,7 +187,7 @@ bool LLNotecard::importStream(std::istream& str) str.getline(line_buf, STD_STRING_BUF_SIZE); if(str.fail()) { - llwarns << "Invalid Linden text length field" << llendl; + LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; return FALSE; } line_buf[STD_STRING_STR_LEN] = '\0'; @@ -195,13 +195,13 @@ bool LLNotecard::importStream(std::istream& str) S32 text_len = 0; if( 1 != sscanf(line_buf, "Text length %d", &text_len) ) { - llwarns << "Invalid Linden text length field" << llendl; + LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; return FALSE; } if(text_len > mMaxText || text_len < 0) { - llwarns << "Invalid Linden text length: " << text_len << llendl; + LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL; return FALSE; } @@ -211,7 +211,7 @@ bool LLNotecard::importStream(std::istream& str) fullread(str, text, text_len); if(str.fail()) { - llwarns << "Invalid Linden text: text shorter than text length: " << text_len << llendl; + LL_WARNS() << "Invalid Linden text: text shorter than text length: " << text_len << LL_ENDL; success = FALSE; } text[text_len] = '\0'; diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 5eb5fb442d..e400877b3b 100755 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -136,7 +136,7 @@ LLParcel::LLParcel(const LLUUID &owner_id, // virtual LLParcel::~LLParcel() { - // user list cleaned up by LLDynamicArray destructor. + // user list cleaned up by std::vector destructor. } void LLParcel::init(const LLUUID &owner_id, @@ -470,8 +470,8 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr } else { - llwarns << "Unknown keyword in parcel access entry section: <" - << keyword << ">" << llendl; + LL_WARNS() << "Unknown keyword in parcel access entry section: <" + << keyword << ">" << LL_ENDL; } } return input_stream.good(); @@ -971,7 +971,7 @@ void LLParcel::startSale(const LLUUID& buyer_id, BOOL is_buyer_group) mGroupID.setNull(); } mSaleTimerExpires.start(); - mSaleTimerExpires.setTimerExpirySec(DEFAULT_USEC_SALE_TIMEOUT / SEC_TO_MICROSEC); + mSaleTimerExpires.setTimerExpirySec(U64Microseconds(DEFAULT_USEC_SALE_TIMEOUT)); mStatus = OS_LEASE_PENDING; mClaimDate = time(NULL); setAuctionID(0); @@ -1096,9 +1096,9 @@ void LLParcel::clearParcel() void LLParcel::dump() { - llinfos << "parcel " << mLocalID << " area " << mArea << llendl; - llinfos << " name <" << mName << ">" << llendl; - llinfos << " desc <" << mDesc << ">" << llendl; + LL_INFOS() << "parcel " << mLocalID << " area " << mArea << LL_ENDL; + LL_INFOS() << " name <" << mName << ">" << LL_ENDL; + LL_INFOS() << " desc <" << mDesc << ">" << LL_ENDL; } const std::string& ownership_status_to_string(LLParcel::EOwnershipStatus status) @@ -1178,7 +1178,7 @@ LLParcel::ECategory category_string_to_category(const std::string& s) return (LLParcel::ECategory)i; } } - llwarns << "Parcel category outside of possibilities " << s << llendl; + LL_WARNS() << "Parcel category outside of possibilities " << s << LL_ENDL; return LLParcel::C_NONE; } diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp index 7e013de11a..e79b753514 100755 --- a/indra/llinventory/llpermissions.cpp +++ b/indra/llinventory/llpermissions.cpp @@ -31,7 +31,6 @@ // library includes #include "message.h" -#include "metapropertyt.h" #include "llsd.h" ///---------------------------------------------------------------------------- @@ -117,7 +116,7 @@ LLUUID LLPermissions::getSafeOwner() const } else { - llwarns << "LLPermissions::getSafeOwner() called with no valid owner!" << llendl; + LL_WARNS() << "LLPermissions::getSafeOwner() called with no valid owner!" << LL_ENDL; LLUUID unused_uuid; unused_uuid.generate(); @@ -666,7 +665,7 @@ BOOL LLPermissions::importFile(LLFILE* fp) } else { - llinfos << "unknown keyword " << keyword << " in permissions import" << llendl; + LL_INFOS() << "unknown keyword " << keyword << " in permissions import" << LL_ENDL; } } fix(); @@ -800,7 +799,7 @@ BOOL LLPermissions::importLegacyStream(std::istream& input_stream) } else { - llinfos << "unknown keyword " << keyword << " in permissions import" << llendl; + LL_INFOS() << "unknown keyword " << keyword << " in permissions import" << LL_ENDL; } } fix(); @@ -895,21 +894,6 @@ std::ostream& operator<<(std::ostream &s, const LLPermissions &perm) return s; } -template <> -void LLMetaClassT<LLPermissions>::reflectProperties(LLMetaClass& meta_class) -{ - reflectProperty(meta_class, "mCreator", &LLPermissions::mCreator); - reflectProperty(meta_class, "mOwner", &LLPermissions::mOwner); - reflectProperty(meta_class, "mGroup", &LLPermissions::mGroup); - reflectProperty(meta_class, "mIsGroupOwned", &LLPermissions::mIsGroupOwned); -} - -// virtual -const LLMetaClass& LLPermissions::getMetaClass() const -{ - return LLMetaClassT<LLPermissions>::instance(); -} - ///---------------------------------------------------------------------------- /// Class LLAggregatePermissions ///---------------------------------------------------------------------------- @@ -997,8 +981,8 @@ void LLAggregatePermissions::aggregateBit(EPermIndex idx, BOOL allowed) mBits[idx] = allowed ? AP_ALL : AP_SOME; break; default: - llwarns << "Bad aggregateBit " << (S32)idx << " " - << (allowed ? "true" : "false") << llendl; + LL_WARNS() << "Bad aggregateBit " << (S32)idx << " " + << (allowed ? "true" : "false") << LL_ENDL; break; } } @@ -1042,8 +1026,8 @@ void LLAggregatePermissions::aggregateIndex(EPermIndex idx, U8 bits) } break; default: - llwarns << "Bad aggregate index " << (S32)idx << " " - << (S32)bits << llendl; + LL_WARNS() << "Bad aggregate index " << (S32)idx << " " + << (S32)bits << LL_ENDL; break; } } diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h index 3ecc922370..89c66f6ebd 100755 --- a/indra/llinventory/llpermissions.h +++ b/indra/llinventory/llpermissions.h @@ -31,7 +31,6 @@ #include "llsd.h" #include "lluuid.h" #include "llxmlnode.h" -#include "reflective.h" #include "llinventorytype.h" // prototypes @@ -83,7 +82,7 @@ template<class T> class LLMetaClassT; // logical consistency. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLPermissions : public LLReflective +class LLPermissions { private: LLUUID mCreator; // null if object created by system @@ -324,9 +323,6 @@ public: friend std::ostream& operator<<(std::ostream &s, const LLPermissions &perm); - // Reflection. - friend class LLMetaClassT<LLPermissions>; - virtual const LLMetaClass& getMetaClass() const; }; // Inlines diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp index dd408a8efe..63e34d188e 100755 --- a/indra/llinventory/llsaleinfo.cpp +++ b/indra/llinventory/llsaleinfo.cpp @@ -179,14 +179,14 @@ BOOL LLSaleInfo::importFile(LLFILE* fp, BOOL& has_perm_mask, U32& perm_mask) } else if (!strcmp("perm_mask", keyword)) { - //llinfos << "found deprecated keyword perm_mask" << llendl; + //LL_INFOS() << "found deprecated keyword perm_mask" << LL_ENDL; has_perm_mask = TRUE; sscanf(valuestr, "%x", &perm_mask); } else { - llwarns << "unknown keyword '" << keyword - << "' in sale info import" << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in sale info import" << LL_ENDL; } } return success; @@ -235,14 +235,14 @@ BOOL LLSaleInfo::importLegacyStream(std::istream& input_stream, BOOL& has_perm_m } else if (!strcmp("perm_mask", keyword)) { - //llinfos << "found deprecated keyword perm_mask" << llendl; + //LL_INFOS() << "found deprecated keyword perm_mask" << LL_ENDL; has_perm_mask = TRUE; sscanf(valuestr, "%x", &perm_mask); } else { - llwarns << "unknown keyword '" << keyword - << "' in sale info import" << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in sale info import" << LL_ENDL; } } return success; diff --git a/indra/llinventory/lltransactionflags.cpp b/indra/llinventory/lltransactionflags.cpp index ee0e6ae26c..e21f29df41 100755 --- a/indra/llinventory/lltransactionflags.cpp +++ b/indra/llinventory/lltransactionflags.cpp @@ -92,11 +92,11 @@ std::string build_transfer_message_to_source( S32 transaction_type, const std::string& description) { - lldebugs << "build_transfer_message_to_source: " << amount << " " + LL_DEBUGS() << "build_transfer_message_to_source: " << amount << " " << source_id << " " << dest_id << " " << dest_name << " " << transaction_type << " " << (description.empty() ? "(no desc)" : description) - << llendl; + << LL_ENDL; if(source_id.isNull()) { return description; @@ -144,10 +144,10 @@ std::string build_transfer_message_to_destination( S32 transaction_type, const std::string& description) { - lldebugs << "build_transfer_message_to_dest: " << amount << " " + LL_DEBUGS() << "build_transfer_message_to_dest: " << amount << " " << dest_id << " " << source_id << " " << source_name << " " << transaction_type << " " << (description.empty() ? "(no desc)" : description) - << llendl; + << LL_ENDL; if(0 == amount) { return std::string(); diff --git a/indra/llinventory/tests/inventorymisc_test.cpp b/indra/llinventory/tests/inventorymisc_test.cpp index c9af7c4eac..7b15552f24 100755 --- a/indra/llinventory/tests/inventorymisc_test.cpp +++ b/indra/llinventory/tests/inventorymisc_test.cpp @@ -153,7 +153,7 @@ namespace tut { LLPointer<LLInventoryItem> src = create_random_inventory_item(); LLSD sd = ll_create_sd_from_inventory_item(src); - //llinfos << "sd: " << *sd << llendl; + //LL_INFOS() << "sd: " << *sd << LL_ENDL; LLPointer<LLInventoryItem> dst = new LLInventoryItem; bool successful_parse = dst->fromLLSD(sd); ensure_equals("0.LLInventoryItem::fromLLSD()", successful_parse, true); @@ -219,7 +219,7 @@ namespace tut src->setCreationDate(new_creation); sd = ll_create_sd_from_inventory_item(src); - //llinfos << "sd: " << *sd << llendl; + //LL_INFOS() << "sd: " << *sd << LL_ENDL; successful_parse = dst->fromLLSD(sd); ensure_equals("13.item id::getUUID() failed", dst->getUUID(), src->getUUID()); ensure_equals("14.parent::getParentUUID() failed", dst->getParentUUID(), src->getParentUUID()); @@ -323,7 +323,7 @@ namespace tut LLFILE* fp = LLFile::fopen("linden_file.dat","w+"); if(!fp) { - llerrs << "file could not be opened\n" << llendl; + LL_ERRS() << "file could not be opened\n" << LL_ENDL; return; } @@ -335,7 +335,7 @@ namespace tut fp = LLFile::fopen("linden_file.dat","r+"); if(!fp) { - llerrs << "file could not be opened\n" << llendl; + LL_ERRS() << "file could not be opened\n" << LL_ENDL; return; } @@ -460,7 +460,7 @@ namespace tut LLFILE* fp = LLFile::fopen("linden_file.dat","w"); if(!fp) { - llerrs << "file coudnt be opened\n" << llendl; + LL_ERRS() << "file coudnt be opened\n" << LL_ENDL; return; } @@ -472,7 +472,7 @@ namespace tut fp = LLFile::fopen("linden_file.dat","r"); if(!fp) { - llerrs << "file coudnt be opened\n" << llendl; + LL_ERRS() << "file coudnt be opened\n" << LL_ENDL; return; } |