aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-07-03 05:20:22 +0000
committerMike Buland <eichlan@xagasoft.com>2007-07-03 05:20:22 +0000
commit110c20e507e1fe0edfba61f678c1974a0a29e9b3 (patch)
tree0e0a3e83855bbab2e4bc35b91499b6adda8a5fbd
parentf7f45e9630912cfca6b3a6b60577f02924c3dbc9 (diff)
downloadlibbu++-110c20e507e1fe0edfba61f678c1974a0a29e9b3.tar.gz
libbu++-110c20e507e1fe0edfba61f678c1974a0a29e9b3.tar.bz2
libbu++-110c20e507e1fe0edfba61f678c1974a0a29e9b3.tar.xz
libbu++-110c20e507e1fe0edfba61f678c1974a0a29e9b3.zip
Added an assignment operator to get data from comparable std::basic_string
classes.
Diffstat (limited to '')
-rw-r--r--src/fstring.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fstring.h b/src/fstring.h
index 1e1fc02..65410af 100644
--- a/src/fstring.h
+++ b/src/fstring.h
@@ -2,6 +2,7 @@
2#define BU_F_STRING_H 2#define BU_F_STRING_H
3 3
4#include <stdint.h> 4#include <stdint.h>
5#include <string>
5#include <memory> 6#include <memory>
6#include "bu/archival.h" 7#include "bu/archival.h"
7#include "bu/archive.h" 8#include "bu/archive.h"
@@ -347,6 +348,14 @@ namespace Bu
347 return (*this); 348 return (*this);
348 } 349 }
349 350
351 MyType &operator =( const std::basic_string<chr> &rData )
352 {
353 clear();
354 append( rData.c_str(), rData.size() );
355
356 return (*this);
357 }
358
350 /** 359 /**
351 * Reset your FString to this character array. 360 * Reset your FString to this character array.
352 *@param pData (const chr *) The character array to set your FString to. 361 *@param pData (const chr *) The character array to set your FString to.