From 5fd512c4292674117135c491e0dafe9b85c06bac Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 15 Oct 2010 11:33:05 +0200 Subject: Add ro_string::assign(ro_string) --- libxsde/xsde/cxx/ro-string.ixx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libxsde/xsde/cxx/ro-string.ixx') 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) -- cgit v1.1