summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-01-08 12:02:26 -0500
committerBen Boeckel <MathStuf@gmail.com>2009-01-08 12:02:26 -0500
commit4926cabd74150bf3887ea913209ec2020b4b745b (patch)
tree98f5da11e99c36f3a8d1f163998d9d15f14bfeeb
parent148635c10b580ce014c6d49908d9dcdb4182266e (diff)
Fixed Store to clear list when loaded/assigned to
-rw-r--r--sigmod/Store.cpp6
-rw-r--r--sigmod/Store.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/sigmod/Store.cpp b/sigmod/Store.cpp
index a7c9a85f..1e6a353e 100644
--- a/sigmod/Store.cpp
+++ b/sigmod/Store.cpp
@@ -87,7 +87,13 @@ Sigmod::Store& Sigmod::Store::operator=(const Store& rhs)
{
if (this == &rhs)
return *this;
+ clear();
COPY(name);
COPY(item);
return *this;
}
+
+void Sigmod::Store::clear()
+{
+ m_item.clear();
+}
diff --git a/sigmod/Store.h b/sigmod/Store.h
index 1ea8640a..63209eaf 100644
--- a/sigmod/Store.h
+++ b/sigmod/Store.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com>
+ * Copyright 2007-2009 Ben Boeckel <MathStuf@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -56,6 +56,8 @@ class SIGMOD_EXPORT Store : public Object
Store& operator=(const Store& rhs);
private:
+ void clear();
+
QString m_name;
QList<int> m_item;
};