From 7c429404a11194270228f543f00259286d19ddbb Mon Sep 17 00:00:00 2001 From: daleharvey Date: Mon, 4 Sep 2006 15:41:45 +0000 Subject: [PATCH] quick bug fix to whiteboard --- src/jabber_whiteboard/keynode.cpp | 2 +- src/jabber_whiteboard/keynode.h | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/jabber_whiteboard/keynode.cpp b/src/jabber_whiteboard/keynode.cpp index af2c0762e..c60bd7827 100644 --- a/src/jabber_whiteboard/keynode.cpp +++ b/src/jabber_whiteboard/keynode.cpp @@ -124,7 +124,7 @@ void KeyNodeTable::addHistory(XML::Node *node, Glib::ustring attribute, Glib::us } } -Configure& KeyNodeTable::getLastHistory(XML::Node *node) +Configure KeyNodeTable::getLastHistory(XML::Node *node) { std::vector::iterator iter; for (iter = items.begin() ; iter != items.end() ; iter++) diff --git a/src/jabber_whiteboard/keynode.h b/src/jabber_whiteboard/keynode.h index df7557fd1..9b8ae8394 100644 --- a/src/jabber_whiteboard/keynode.h +++ b/src/jabber_whiteboard/keynode.h @@ -28,28 +28,30 @@ public: KeyNodePair(const Glib::ustring &keyArg, const XML::Node *nodeArg) { - key = keyArg; - node = (XML::Node *)nodeArg; - version = 0; - index = 0; + this->key = keyArg; + this->node = (XML::Node *)nodeArg; + this->version = 0; + this->index = 0; + this->history.push_back(Configure("","")); } KeyNodePair(const Glib::ustring &keyArg, const XML::Node *nodeArg, unsigned int version, signed int index) { - key = keyArg; - node = (XML::Node *)nodeArg; + this->key = keyArg; + this->node = (XML::Node *)nodeArg; this->version = version; this->index = index; + this->history.push_back(Configure("","")); } KeyNodePair(const KeyNodePair &other) { - key = other.key; - node = other.node; - version = other.version; - index = other.index; - history = other.history; + this->key = other.key; + this->node = other.node; + this->version = other.version; + this->index = other.index; + this->history = other.history; } virtual ~KeyNodePair() {} @@ -105,7 +107,7 @@ public: virtual void addHistory(XML::Node *node, Glib::ustring attribute, Glib::ustring value); - virtual Configure& getLastHistory(XML::Node *node); + virtual Configure getLastHistory(XML::Node *node); private: -- 2.30.2