diff options
author | Ira Rice <irarice@gmail.com> | 2008-12-02 11:19:57 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-12-02 11:19:57 -0700 |
commit | fdc24c062eb4a73aa81b941b67d277691d6dd5a1 (patch) | |
tree | 14c20ce9e24df7562ca8c7c3504df33902881ec0 /src/resources | |
parent | 52401fd3ce7f9ce94069ecc71412466af4e893a0 (diff) | |
download | mana-client-fdc24c062eb4a73aa81b941b67d277691d6dd5a1.tar.gz mana-client-fdc24c062eb4a73aa81b941b67d277691d6dd5a1.tar.bz2 mana-client-fdc24c062eb4a73aa81b941b67d277691d6dd5a1.tar.xz mana-client-fdc24c062eb4a73aa81b941b67d277691d6dd5a1.zip |
Changed colordb to only use one XML::Document pointer, instead of
instantiating two XML::Document variables. Probably was a bit tired the
day I made that fix, so I missed the obvious solution.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/colordb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/colordb.cpp b/src/resources/colordb.cpp index 2340a8f2..bb5bd0d1 100644 --- a/src/resources/colordb.cpp +++ b/src/resources/colordb.cpp @@ -46,9 +46,8 @@ void ColorDB::load() return; } - XML::Document doc(HAIR_COLOR_FILE); - XML::Document doc2(TMW_COLOR_FILE); - xmlNodePtr root = doc.rootNode(); + XML::Document *doc = new XML::Document(HAIR_COLOR_FILE); + xmlNodePtr root = doc->rootNode(); bool TMWHair = false; if (!root || !xmlStrEqual(root->name, BAD_CAST "colors")) @@ -56,7 +55,8 @@ void ColorDB::load() logger->log("Trying TMW's color file, %s.", TMW_COLOR_FILE); TMWHair = true; - root = doc2.rootNode(); + doc = new XML::Document(TMW_COLOR_FILE); + root = doc->rootNode(); if (!root || !xmlStrEqual(root->name, BAD_CAST "colors")) { logger->log("ColorDB: Failed"); |