Changeset 9386 in orxonox.OLD for branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_string.cc
- Timestamp:
- Jul 21, 2006, 1:41:39 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_string.cc
r8147 r9386 17 17 #include "synchronizeable_string.h" 18 18 #include "converter.h" 19 #include <cassert> 19 20 20 21 … … 46 47 { 47 48 int res = Converter::stringToByteArray( *vPtrIn, buf, maxLength ); 48 49 49 50 assert( res > 0 ); 50 51 assert( res == vPtrIn->length()+INTSIZE ); 51 52 52 53 return res; 54 } 55 56 int SynchronizeableString::getSize() 57 { 58 return vPtrIn->length()+INTSIZE; 53 59 } 54 60 … … 62 68 { 63 69 std::string oldVal = *vPtrOut; 64 70 65 71 int res = Converter::byteArrayToString( buf, *vPtrOut, maxLength ); 66 72 67 73 setHasChanged( oldVal != *vPtrOut ); 68 74 69 75 if ( res < 0 ) 70 76 { … … 72 78 } 73 79 assert( res > 0 ); 74 80 75 81 return res; 76 82 } … … 94 100 { 95 101 std::string t; 96 102 97 103 int res = Converter::byteArrayToString( buf, t, maxLength ); 98 104 99 105 assert( res > 0 ); 100 106 101 107 return res; 102 108 }
Note: See TracChangeset
for help on using the changeset viewer.