Add missing assignment operator to aiString

pull/1765/head
Turo Lamminen 2018-02-03 15:51:20 +02:00
parent 7de0453b46
commit 6aafc58797
1 changed files with 14 additions and 0 deletions

View File

@ -304,6 +304,20 @@ struct aiString
data[len] = 0;
}
/** Assigment operator */
aiString& operator = (const aiString &rOther) {
if (this == &rOther) {
return *this;
}
length = rOther.length;;
memcpy( data, rOther.data, length);
data[length] = '\0';
return *this;
}
/** Assign a const char* to the string */
aiString& operator = (const char* sz) {
Set(sz);