aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llwearablelist.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llwearablelist.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llwearablelist.cpp')
-rw-r--r--linden/indra/newview/llwearablelist.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/linden/indra/newview/llwearablelist.cpp b/linden/indra/newview/llwearablelist.cpp
index 75986c1..cf5d91b 100644
--- a/linden/indra/newview/llwearablelist.cpp
+++ b/linden/indra/newview/llwearablelist.cpp
@@ -43,14 +43,14 @@
43#include "llnotify.h" 43#include "llnotify.h"
44 44
45// Globals 45// Globals
46LLWearableList gWearableList; 46LLWearableList gWearableList; // Globally constructed; be careful that there's no dependency with gAgent.
47 47
48 48
49struct LLWearableArrivedData 49struct LLWearableArrivedData
50{ 50{
51 LLWearableArrivedData( 51 LLWearableArrivedData(
52 LLAssetType::EType asset_type, 52 LLAssetType::EType asset_type,
53 const LLString& wearable_name, 53 const std::string& wearable_name,
54 void(*asset_arrived_callback)(LLWearable*, void* userdata), 54 void(*asset_arrived_callback)(LLWearable*, void* userdata),
55 void* userdata ) 55 void* userdata )
56 : 56 :
@@ -64,7 +64,7 @@ struct LLWearableArrivedData
64 LLAssetType::EType mAssetType; 64 LLAssetType::EType mAssetType;
65 void (*mCallback)(LLWearable*, void* userdata); 65 void (*mCallback)(LLWearable*, void* userdata);
66 void* mUserdata; 66 void* mUserdata;
67 LLString mName; 67 std::string mName;
68 S32 mRetries; 68 S32 mRetries;
69}; 69};
70 70
@@ -79,7 +79,7 @@ LLWearableList::~LLWearableList()
79 mList.clear(); 79 mList.clear();
80} 80}
81 81
82void LLWearableList::getAsset( const LLAssetID& assetID, const LLString& wearable_name, LLAssetType::EType asset_type, void(*asset_arrived_callback)(LLWearable*, void* userdata), void* userdata ) 82void LLWearableList::getAsset( const LLAssetID& assetID, const std::string& wearable_name, LLAssetType::EType asset_type, void(*asset_arrived_callback)(LLWearable*, void* userdata), void* userdata )
83{ 83{
84 llassert( (asset_type == LLAssetType::AT_CLOTHING) || (asset_type == LLAssetType::AT_BODYPART) ); 84 llassert( (asset_type == LLAssetType::AT_CLOTHING) || (asset_type == LLAssetType::AT_BODYPART) );
85 LLWearable* instance = get_if_there(mList, assetID, (LLWearable*)NULL ); 85 LLWearable* instance = get_if_there(mList, assetID, (LLWearable*)NULL );
@@ -112,7 +112,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
112 if( status >= 0 ) 112 if( status >= 0 )
113 { 113 {
114 // read the file 114 // read the file
115 LLFILE* fp = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/ 115 LLFILE* fp = LLFile::fopen(std::string(filename), "rb"); /*Flawfinder: ignore*/
116 if( !fp ) 116 if( !fp )
117 { 117 {
118 LL_WARNS("Wearable") << "Bad Wearable Asset: unable to open file: '" << filename << "'" << LL_ENDL; 118 LL_WARNS("Wearable") << "Bad Wearable Asset: unable to open file: '" << filename << "'" << LL_ENDL;
@@ -130,7 +130,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
130 fclose( fp ); 130 fclose( fp );
131 if(filename) 131 if(filename)
132 { 132 {
133 LLFile::remove(filename); 133 LLFile::remove(std::string(filename));
134 } 134 }
135 } 135 }
136 } 136 }
@@ -138,7 +138,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
138 { 138 {
139 if(filename) 139 if(filename)
140 { 140 {
141 LLFile::remove(filename); 141 LLFile::remove(std::string(filename));
142 } 142 }
143 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); 143 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
144 144
@@ -180,7 +180,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
180 } 180 }
181 else 181 else
182 { 182 {
183 LLString::format_map_t args; 183 LLStringUtil::format_map_t args;
184 // *TODO:translate 184 // *TODO:translate
185 args["[TYPE]"] = LLAssetType::lookupHumanReadable(data->mAssetType); 185 args["[TYPE]"] = LLAssetType::lookupHumanReadable(data->mAssetType);
186 if (data->mName.empty()) 186 if (data->mName.empty())
@@ -290,7 +290,7 @@ LLWearable* LLWearableList::createNewWearable( EWearableType type )
290 LLWearable* wearable = new LLWearable( tid ); 290 LLWearable* wearable = new LLWearable( tid );
291 wearable->setType( type ); 291 wearable->setType( type );
292 292
293 LLString name = "New "; 293 std::string name = "New ";
294 name.append( wearable->getTypeLabel() ); 294 name.append( wearable->getTypeLabel() );
295 wearable->setName( name ); 295 wearable->setName( name );
296 296