From eb71d88041ccbb0aec3532f9b1aa40e956e948c2 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 13 May 2006 01:54:06 +0000 Subject: Changed some things in the serializer...it's cool --- src/staticstring.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/staticstring.cpp') 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 @@ #include "staticstring.h" +#include "serializer.h" #include #include @@ -182,3 +183,18 @@ void StaticString::clear() memset( lpStr, 0, nLen+1 ); } +void StaticString::serialize( Serializer &ar ) +{ + if( ar.isLoading() ) + { + ar >> nLen; + setLength( nLen ); + ar.read( lpStr, nLen ); + } + else + { + ar << nLen; + ar.write( lpStr, nLen ); + } +} + -- cgit v1.2.3