diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-15 11:33:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-15 11:33:05 +0200 |
commit | 5fd512c4292674117135c491e0dafe9b85c06bac (patch) | |
tree | 5abc30e26defacae31e3f190cbdc66da9fdb380d /libxsde/xsde/cxx/ro-string.ixx | |
parent | 7d741ce67266e50648e2060ff40f5c098c6bdba3 (diff) |
Add ro_string::assign(ro_string)
Diffstat (limited to 'libxsde/xsde/cxx/ro-string.ixx')
-rw-r--r-- | libxsde/xsde/cxx/ro-string.ixx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libxsde/xsde/cxx/ro-string.ixx b/libxsde/xsde/cxx/ro-string.ixx index c45d87a..35a7e3d 100644 --- a/libxsde/xsde/cxx/ro-string.ixx +++ b/libxsde/xsde/cxx/ro-string.ixx @@ -92,6 +92,13 @@ namespace xsde } inline void ro_string:: + assign (const ro_string& s) + { + data_ = s.data (); + size_ = s.size (); + } + + inline void ro_string:: assign (const string& s) { data_ = s.data (); @@ -123,7 +130,7 @@ namespace xsde compare (const char* str, size_t n) const { size_t s = size_ < n ? size_ : n; - + int r = s != 0 ? strncmp (data_, str, s) : 0; if (!r && size_ != n) |