aboutsummaryrefslogtreecommitdiff
path: root/src/staticstring.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-05-13 01:54:06 +0000
committerMike Buland <eichlan@xagasoft.com>2006-05-13 01:54:06 +0000
commiteb71d88041ccbb0aec3532f9b1aa40e956e948c2 (patch)
treef2cb344f21b0cac643435701ddf4742c9a581707 /src/staticstring.cpp
parent3df557a87b39fc4c2ff14006506e6992d1620ab0 (diff)
downloadlibbu++-eb71d88041ccbb0aec3532f9b1aa40e956e948c2.tar.gz
libbu++-eb71d88041ccbb0aec3532f9b1aa40e956e948c2.tar.bz2
libbu++-eb71d88041ccbb0aec3532f9b1aa40e956e948c2.tar.xz
libbu++-eb71d88041ccbb0aec3532f9b1aa40e956e948c2.zip
Changed some things in the serializer...it's cool
Diffstat (limited to '')
-rw-r--r--src/staticstring.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/staticstring.cpp b/src/staticstring.cpp
index 7543178..24b9ecb 100644
--- a/src/staticstring.cpp
+++ b/src/staticstring.cpp
@@ -1,4 +1,5 @@
1#include "staticstring.h" 1#include "staticstring.h"
2#include "serializer.h"
2 3
3#include <stdlib.h> 4#include <stdlib.h>
4#include <stdio.h> 5#include <stdio.h>
@@ -182,3 +183,18 @@ void StaticString::clear()
182 memset( lpStr, 0, nLen+1 ); 183 memset( lpStr, 0, nLen+1 );
183} 184}
184 185
186void StaticString::serialize( Serializer &ar )
187{
188 if( ar.isLoading() )
189 {
190 ar >> nLen;
191 setLength( nLen );
192 ar.read( lpStr, nLen );
193 }
194 else
195 {
196 ar << nLen;
197 ar.write( lpStr, nLen );
198 }
199}
200