diff options
author | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
commit | 215f423cbe18fe9ca14a26caef918d303bad28ff (patch) | |
tree | 0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/llinventory/llparcel.cpp | |
parent | Second Life viewer sources 1.18.3.5-RC (diff) | |
download | meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2 meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz |
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to 'linden/indra/llinventory/llparcel.cpp')
-rw-r--r-- | linden/indra/llinventory/llparcel.cpp | 46 |
1 files changed, 16 insertions, 30 deletions
diff --git a/linden/indra/llinventory/llparcel.cpp b/linden/indra/llinventory/llparcel.cpp index 5902acd..3a67385 100644 --- a/linden/indra/llinventory/llparcel.cpp +++ b/linden/indra/llinventory/llparcel.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llparcel.cpp | 2 | * @file llparcel.cpp |
3 | * @brief A land parcel. | 3 | * @brief A land parcel. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
@@ -256,42 +259,25 @@ void LLParcel::overrideParcelFlags(U32 flags) | |||
256 | mParcelFlags = flags; | 259 | mParcelFlags = flags; |
257 | } | 260 | } |
258 | 261 | ||
259 | void set_std_string(const char* src, std::string& dest) | 262 | void LLParcel::setName(const LLString& name) |
260 | { | ||
261 | if(src) | ||
262 | { | ||
263 | dest.assign(src); | ||
264 | } | ||
265 | else | ||
266 | { | ||
267 | #if (LL_LINUX && __GNUC__ < 3) | ||
268 | dest.assign(std::string("")); | ||
269 | #else | ||
270 | dest.clear(); | ||
271 | #endif | ||
272 | } | ||
273 | } | ||
274 | |||
275 | void LLParcel::setName(const char* name) | ||
276 | { | 263 | { |
277 | // The escaping here must match the escaping in the database | 264 | // The escaping here must match the escaping in the database |
278 | // abstraction layer. | 265 | // abstraction layer. |
279 | set_std_string(name, mName); | 266 | mName = name; |
280 | LLStringFn::replace_nonprintable(mName, LL_UNKNOWN_CHAR); | 267 | LLStringFn::replace_nonprintable(mName, LL_UNKNOWN_CHAR); |
281 | } | 268 | } |
282 | 269 | ||
283 | void LLParcel::setDesc(const char* desc) | 270 | void LLParcel::setDesc(const LLString& desc) |
284 | { | 271 | { |
285 | // The escaping here must match the escaping in the database | 272 | // The escaping here must match the escaping in the database |
286 | // abstraction layer. | 273 | // abstraction layer. |
287 | set_std_string(desc, mDesc); | 274 | mDesc = desc; |
288 | mDesc = rawstr_to_utf8(mDesc); | 275 | mDesc = rawstr_to_utf8(mDesc); |
289 | } | 276 | } |
290 | 277 | ||
291 | void LLParcel::setMusicURL(const char* url) | 278 | void LLParcel::setMusicURL(const LLString& url) |
292 | { | 279 | { |
293 | set_std_string(url, mMusicURL); | 280 | mMusicURL = url; |
294 | |||
295 | // The escaping here must match the escaping in the database | 281 | // The escaping here must match the escaping in the database |
296 | // abstraction layer. | 282 | // abstraction layer. |
297 | // This should really filter the url in some way. Other than | 283 | // This should really filter the url in some way. Other than |
@@ -299,10 +285,9 @@ void LLParcel::setMusicURL(const char* url) | |||
299 | LLStringFn::replace_nonprintable(mMusicURL, LL_UNKNOWN_CHAR); | 285 | LLStringFn::replace_nonprintable(mMusicURL, LL_UNKNOWN_CHAR); |
300 | } | 286 | } |
301 | 287 | ||
302 | void LLParcel::setMediaURL(const char* url) | 288 | void LLParcel::setMediaURL(const LLString& url) |
303 | { | 289 | { |
304 | set_std_string(url, mMediaURL); | 290 | mMediaURL = url; |
305 | |||
306 | // The escaping here must match the escaping in the database | 291 | // The escaping here must match the escaping in the database |
307 | // abstraction layer if it's ever added. | 292 | // abstraction layer if it's ever added. |
308 | // This should really filter the url in some way. Other than | 293 | // This should really filter the url in some way. Other than |
@@ -568,19 +553,19 @@ BOOL LLParcel::importStream(std::istream& input_stream) | |||
568 | } | 553 | } |
569 | else if ("name" == keyword) | 554 | else if ("name" == keyword) |
570 | { | 555 | { |
571 | setName( value.c_str() ); | 556 | setName( value ); |
572 | } | 557 | } |
573 | else if ("desc" == keyword) | 558 | else if ("desc" == keyword) |
574 | { | 559 | { |
575 | setDesc( value.c_str() ); | 560 | setDesc( value ); |
576 | } | 561 | } |
577 | else if ("music_url" == keyword) | 562 | else if ("music_url" == keyword) |
578 | { | 563 | { |
579 | setMusicURL( value.c_str() ); | 564 | setMusicURL( value ); |
580 | } | 565 | } |
581 | else if ("media_url" == keyword) | 566 | else if ("media_url" == keyword) |
582 | { | 567 | { |
583 | setMediaURL( value.c_str() ); | 568 | setMediaURL( value ); |
584 | } | 569 | } |
585 | else if ("media_id" == keyword) | 570 | else if ("media_id" == keyword) |
586 | { | 571 | { |
@@ -1835,3 +1820,4 @@ LLParcel::ECategory category_ui_string_to_category(const char* s) | |||
1835 | return LLParcel::C_ANY; | 1820 | return LLParcel::C_ANY; |
1836 | } | 1821 | } |
1837 | 1822 | ||
1823 | |||