aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/lscript/lscript_byteconvert.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/lscript/lscript_byteconvert.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/linden/indra/lscript/lscript_byteconvert.h b/linden/indra/lscript/lscript_byteconvert.h
index 9530b63..573a6ce 100644
--- a/linden/indra/lscript/lscript_byteconvert.h
+++ b/linden/indra/lscript/lscript_byteconvert.h
@@ -4,7 +4,7 @@
4 * 4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$ 5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2002-2008, Linden Research, Inc. 7 * Copyright (c) 2002-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -250,7 +250,7 @@ inline void bytestream2vector(LLVector3 &vector, const U8 *stream, S32 &offset)
250 } 250 }
251} 251}
252 252
253inline void vector2bytestream(U8 *stream, S32 &offset, LLVector3 &vector) 253inline void vector2bytestream(U8 *stream, S32 &offset, const LLVector3 &vector)
254{ 254{
255 S32 value = *(S32 *)&vector.mV[VZ]; 255 S32 value = *(S32 *)&vector.mV[VZ];
256 integer2bytestream(stream, offset, value); 256 integer2bytestream(stream, offset, value);
@@ -292,7 +292,7 @@ inline void bytestream2quaternion(LLQuaternion &quat, const U8 *stream, S32 &off
292 } 292 }
293} 293}
294 294
295inline void quaternion2bytestream(U8 *stream, S32 &offset, LLQuaternion &quat) 295inline void quaternion2bytestream(U8 *stream, S32 &offset, const LLQuaternion &quat)
296{ 296{
297 S32 value = *(S32 *)&quat.mQ[VS]; 297 S32 value = *(S32 *)&quat.mQ[VS];
298 integer2bytestream(stream, offset, value); 298 integer2bytestream(stream, offset, value);
@@ -528,7 +528,7 @@ inline void lscript_push(U8 *stream, F32 value)
528 } 528 }
529} 529}
530 530
531inline void lscript_push(U8 *stream, LLVector3 &value) 531inline void lscript_push(U8 *stream, const LLVector3 &value)
532{ 532{
533 S32 sp = get_register(stream, LREG_SP); 533 S32 sp = get_register(stream, LREG_SP);
534 sp -= LSCRIPTDataSize[LST_VECTOR]; 534 sp -= LSCRIPTDataSize[LST_VECTOR];
@@ -539,7 +539,7 @@ inline void lscript_push(U8 *stream, LLVector3 &value)
539 } 539 }
540} 540}
541 541
542inline void lscript_push(U8 *stream, LLQuaternion &value) 542inline void lscript_push(U8 *stream, const LLQuaternion &value)
543{ 543{
544 S32 sp = get_register(stream, LREG_SP); 544 S32 sp = get_register(stream, LREG_SP);
545 sp -= LSCRIPTDataSize[LST_QUATERNION]; 545 sp -= LSCRIPTDataSize[LST_QUATERNION];
@@ -679,13 +679,13 @@ inline void lscript_local_store(U8 *stream, S32 address, F32 value)
679 float2bytestream(stream, address, value); 679 float2bytestream(stream, address, value);
680} 680}
681 681
682inline void lscript_local_store(U8 *stream, S32 address, LLVector3 value) 682inline void lscript_local_store(U8 *stream, S32 address, const LLVector3 value)
683{ 683{
684 if (lscript_check_local(stream, address, LSCRIPTDataSize[LST_VECTOR])) 684 if (lscript_check_local(stream, address, LSCRIPTDataSize[LST_VECTOR]))
685 vector2bytestream(stream, address, value); 685 vector2bytestream(stream, address, value);
686} 686}
687 687
688inline void lscript_local_store(U8 *stream, S32 address, LLQuaternion value) 688inline void lscript_local_store(U8 *stream, S32 address, const LLQuaternion value)
689{ 689{
690 if (lscript_check_local(stream, address, LSCRIPTDataSize[LST_QUATERNION])) 690 if (lscript_check_local(stream, address, LSCRIPTDataSize[LST_QUATERNION]))
691 quaternion2bytestream(stream, address, value); 691 quaternion2bytestream(stream, address, value);
@@ -703,13 +703,13 @@ inline void lscript_global_store(U8 *stream, S32 address, F32 value)
703 float2bytestream(stream, address, value); 703 float2bytestream(stream, address, value);
704} 704}
705 705
706inline void lscript_global_store(U8 *stream, S32 address, LLVector3 value) 706inline void lscript_global_store(U8 *stream, S32 address, const LLVector3 value)
707{ 707{
708 if (lscript_check_global(stream, address, LSCRIPTDataSize[LST_VECTOR])) 708 if (lscript_check_global(stream, address, LSCRIPTDataSize[LST_VECTOR]))
709 vector2bytestream(stream, address, value); 709 vector2bytestream(stream, address, value);
710} 710}
711 711
712inline void lscript_global_store(U8 *stream, S32 address, LLQuaternion value) 712inline void lscript_global_store(U8 *stream, S32 address, const LLQuaternion value)
713{ 713{
714 if (lscript_check_global(stream, address, LSCRIPTDataSize[LST_QUATERNION])) 714 if (lscript_check_global(stream, address, LSCRIPTDataSize[LST_QUATERNION]))
715 quaternion2bytestream(stream, address, value); 715 quaternion2bytestream(stream, address, value);
@@ -1125,7 +1125,7 @@ inline void safe_instruction_bytestream2vector(LLVector3 &value, U8 *stream, S32
1125 } 1125 }
1126} 1126}
1127 1127
1128inline void safe_instruction_vector2bytestream(U8 *stream, S32 &offset, LLVector3 &value) 1128inline void safe_instruction_vector2bytestream(U8 *stream, S32 &offset, const LLVector3 &value)
1129{ 1129{
1130 if (safe_instruction_check_address(stream, offset, LSCRIPTDataSize[LST_VECTOR])) 1130 if (safe_instruction_check_address(stream, offset, LSCRIPTDataSize[LST_VECTOR]))
1131 { 1131 {
@@ -1141,7 +1141,7 @@ inline void safe_instruction_bytestream2quaternion(LLQuaternion &value, U8 *stre
1141 } 1141 }
1142} 1142}
1143 1143
1144inline void safe_instruction_quaternion2bytestream(U8 *stream, S32 &offset, LLQuaternion &value) 1144inline void safe_instruction_quaternion2bytestream(U8 *stream, S32 &offset, const LLQuaternion &value)
1145{ 1145{
1146 if (safe_instruction_check_address(stream, offset, LSCRIPTDataSize[LST_QUATERNION])) 1146 if (safe_instruction_check_address(stream, offset, LSCRIPTDataSize[LST_QUATERNION]))
1147 { 1147 {