From 6f5eb015bfe6a165ea2609e3d1f0002827f2362d Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 19 Aug 2012 22:41:30 -0700 Subject: [PATCH] Fix the bug causing 'Paths' not to have a name. The implicit 'operator=' function obliterated the name. --- src/SerializedTypes.cpp | 8 ++++++++ src/SerializedTypes.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/SerializedTypes.cpp b/src/SerializedTypes.cpp index 2a6b0f978e..da96fa5373 100644 --- a/src/SerializedTypes.cpp +++ b/src/SerializedTypes.cpp @@ -463,6 +463,14 @@ std::string STPathSet::getText() const } #endif +STPathSet& STPathSet::operator=(const STPathSet& p) +{ + if (name == NULL) + name = p.name; + value = p.value; + return *this; +} + void STPathSet::add(Serializer& s) const { bool bFirst = true; diff --git a/src/SerializedTypes.h b/src/SerializedTypes.h index 1ba0793ad3..7b7aa562b9 100644 --- a/src/SerializedTypes.h +++ b/src/SerializedTypes.h @@ -668,6 +668,7 @@ public: void addPath(const STPath& e) { value.push_back(e); } virtual bool isEquivalent(const SerializedType& t) const; + STPathSet& operator=(const STPathSet&); std::vector::iterator begin() { return value.begin(); } std::vector::iterator end() { return value.end(); }