summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);