Trying to fix MString assignments.
This commit is contained in:
1 parent
74ab316e64
commit
d020363bc9
12 files changed
+75
-16
No files matched your search
+13
-6
@@ -81,13 +81,20 @@ namespace coreutils {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MString &MString::operator=(coreutils::ZString value) {
|
||||
setSize(value.getLength());
|
||||
memcpy(data, value.getData(), value.getLength());
|
||||
length = value.getLength();
|
||||
return *this;
|
||||
MString &MString::operator=(coreutils::ZString value) {
|
||||
setSize(value.getLength());
|
||||
memcpy(data, value.getData(), value.getLength());
|
||||
length = value.getLength();
|
||||
return *this;
|
||||
}
|
||||
|
||||
MString &MString::operator=(std::string value) {
|
||||
setSize(value.length());
|
||||
memcpy(data, value.c_str(), value.length());
|
||||
length = value.length();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
MString &MString::operator=(const char *value) {
|
||||
int len = strlen(value);
|
||||
setSize(len);
|
||||
|
||||
Reference in new issue
Block a user