aboutsummaryrefslogtreecommitdiff
path: root/src/staticstring.cpp
diff options
context:
space:
mode:
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