diff options
-rw-r--r-- | libxsde/xsde/cxx/ro-string.hxx | 3 | ||||
-rw-r--r-- | libxsde/xsde/cxx/ro-string.ixx | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/libxsde/xsde/cxx/ro-string.hxx b/libxsde/xsde/cxx/ro-string.hxx index f13f9e4..a89ab2c 100644 --- a/libxsde/xsde/cxx/ro-string.hxx +++ b/libxsde/xsde/cxx/ro-string.hxx @@ -76,6 +76,9 @@ namespace xsde assign (const char*, size_t); void + assign (const ro_string&); + + void assign (const string&); #ifdef XSDE_STL 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) |