diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llcharacter/llcharacter.cpp | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llcharacter/llcharacter.cpp')
-rw-r--r-- | linden/indra/llcharacter/llcharacter.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/linden/indra/llcharacter/llcharacter.cpp b/linden/indra/llcharacter/llcharacter.cpp index af4c5aa..0339cf0 100644 --- a/linden/indra/llcharacter/llcharacter.cpp +++ b/linden/indra/llcharacter/llcharacter.cpp | |||
@@ -241,33 +241,15 @@ void LLCharacter::dumpCharacter( LLJoint* joint ) | |||
241 | //----------------------------------------------------------------------------- | 241 | //----------------------------------------------------------------------------- |
242 | void LLCharacter::setAnimationData(std::string name, void *data) | 242 | void LLCharacter::setAnimationData(std::string name, void *data) |
243 | { | 243 | { |
244 | if(mAnimationData.getValue(name)) | 244 | mAnimationData[name] = data; |
245 | { | ||
246 | *mAnimationData[name] = data; | ||
247 | } | ||
248 | else | ||
249 | { | ||
250 | mAnimationData.addToHead(name, data); | ||
251 | } | ||
252 | } | 245 | } |
253 | 246 | ||
254 | //----------------------------------------------------------------------------- | 247 | //----------------------------------------------------------------------------- |
255 | // getAnimationData() | 248 | // getAnimationData() |
256 | //----------------------------------------------------------------------------- | 249 | //----------------------------------------------------------------------------- |
257 | void * LLCharacter::getAnimationData(std::string name) | 250 | void* LLCharacter::getAnimationData(std::string name) |
258 | { | 251 | { |
259 | void **result = mAnimationData.getValue(name); | 252 | return get_if_there(mAnimationData, name, (void*)NULL); |
260 | void *return_value; // Necessary to suppress VC6 warning. JC | ||
261 | if (!result) | ||
262 | { | ||
263 | return_value = NULL; | ||
264 | } | ||
265 | else | ||
266 | { | ||
267 | return_value = *result; | ||
268 | } | ||
269 | |||
270 | return return_value; | ||
271 | } | 253 | } |
272 | 254 | ||
273 | //----------------------------------------------------------------------------- | 255 | //----------------------------------------------------------------------------- |
@@ -275,7 +257,7 @@ void * LLCharacter::getAnimationData(std::string name) | |||
275 | //----------------------------------------------------------------------------- | 257 | //----------------------------------------------------------------------------- |
276 | void LLCharacter::removeAnimationData(std::string name) | 258 | void LLCharacter::removeAnimationData(std::string name) |
277 | { | 259 | { |
278 | mAnimationData.remove(name); | 260 | mAnimationData.erase(name); |
279 | } | 261 | } |
280 | 262 | ||
281 | //----------------------------------------------------------------------------- | 263 | //----------------------------------------------------------------------------- |