From 6aafc5879761c41e950df16355782ab7ab801f36 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Sat, 3 Feb 2018 15:51:20 +0200 Subject: [PATCH] Add missing assignment operator to aiString --- include/assimp/types.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/assimp/types.h b/include/assimp/types.h index f0d9b2428..9868f657c 100644 --- a/include/assimp/types.h +++ b/include/assimp/types.h @@ -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);