summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-02-03 14:45:00 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-02-03 14:45:00 +0000
commit6234d688638954f172372f646cb300642989ffeb (patch)
tree57eb6aa36a64dc80f92c470753e95d7389c83d77 /hwpfilter
parentb53dc656ea70272ea905876378e4b00409780095 (diff)
fix copy ctor and assignment sigs
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/mzstring.cpp6
-rw-r--r--hwpfilter/source/mzstring.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/hwpfilter/source/mzstring.cpp b/hwpfilter/source/mzstring.cpp
index aadb688762cf..c8d7e977bdac 100644
--- a/hwpfilter/source/mzstring.cpp
+++ b/hwpfilter/source/mzstring.cpp
@@ -78,7 +78,7 @@ MzString::~MzString()
}
-void MzString::operator = (MzString &s)
+MzString &MzString::operator = (MzString &s)
{
int n = s.length();
if (allocate(n))
@@ -86,10 +86,11 @@ void MzString::operator = (MzString &s)
if (n > 0) memcpy(Data, s.Data, n);
Length = n;
}
+ return *this;
}
-void MzString::operator = (const char *s)
+MzString &MzString::operator = (const char *s)
{
if (s == NULL)
s = "";
@@ -99,6 +100,7 @@ void MzString::operator = (const char *s)
if (n > 0) memcpy(Data, s, n);
Length = n;
}
+ return *this;
}
diff --git a/hwpfilter/source/mzstring.h b/hwpfilter/source/mzstring.h
index c8d8b159545e..95b1614dfda3 100644
--- a/hwpfilter/source/mzstring.h
+++ b/hwpfilter/source/mzstring.h
@@ -108,8 +108,8 @@ class MzString
bool resize(int len);
// Assignment
- void operator = (MzString &s);
- void operator = (const char *s);
+ MzString &operator = (MzString &s);
+ MzString &operator = (const char *s);
// Appending
MzString &operator += (char);