summaryrefslogtreecommitdiff
path: root/Ivy
diff options
context:
space:
mode:
Diffstat (limited to 'Ivy')
-rw-r--r--Ivy/DataTypes.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/Ivy/DataTypes.h b/Ivy/DataTypes.h
index acc4aa0..2267de7 100644
--- a/Ivy/DataTypes.h
+++ b/Ivy/DataTypes.h
@@ -79,16 +79,18 @@ public:
str.append( right.ptr, right.size);
return str;
}
- operator +=(string s)
+ const string& operator +=(string s)
{
- append( s.ptr, s.size );
+ return append( s.ptr, s.size );
}
- operator +=(const char* s)
+ const string& operator +=(const char* s)
{
- append( s, strlen(s) );
+ return append( s, strlen(s) );
+ }
+ const string& operator +=(char c)
+ {
+ return append( &c, 1);
}
- operator +=(char c)
- { append( &c, 1);}
string operator +(string s) const
{ string str ( ptr, size ); str.append( s.ptr, s.size ); return str; }
string operator +(const char c) const