diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-09-23 19:12:44 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-09-23 19:12:44 (GMT) |
commit | de660b763459cdd707876ec244b6866abca07fa2 (patch) | |
tree | cc9e34f17a18dc152b8a90a0c7cf0076c46a297e /Swiften/Parser/Tree/ParserElement.cpp | |
parent | de50064af14eb31f027ea7fa59501c9b3754eafd (diff) | |
download | swift-contrib-de660b763459cdd707876ec244b6866abca07fa2.zip swift-contrib-de660b763459cdd707876ec244b6866abca07fa2.tar.bz2 |
Whitespace tweaks.
Diffstat (limited to 'Swiften/Parser/Tree/ParserElement.cpp')
-rw-r--r-- | Swiften/Parser/Tree/ParserElement.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Swiften/Parser/Tree/ParserElement.cpp b/Swiften/Parser/Tree/ParserElement.cpp index 0baf709..9d9b9b6 100644 --- a/Swiften/Parser/Tree/ParserElement.cpp +++ b/Swiften/Parser/Tree/ParserElement.cpp @@ -7,27 +7,21 @@ #include <Swiften/Parser/Tree/ParserElement.h> #include <Swiften/Parser/Tree/NullParserElement.h> #include <iostream> namespace Swift{ ParserElement::ParserElement(const std::string& name, const std::string& xmlns, const AttributeMap& attributes) : name_(name), xmlns_(xmlns), attributes_(attributes) { - } ParserElement::~ParserElement() { - -} - -ParserElement::operator bool() { - return true; } ParserElement::ref ParserElement::addChild(const std::string& name, const std::string& xmlns, const AttributeMap& attributes) { ParserElement::ref child = boost::make_shared<ParserElement>(name, xmlns, attributes); children_.push_back(child); return child; } void ParserElement::appendCharacterData(const std::string& data) { @@ -46,14 +40,14 @@ struct DoesntMatch { std::vector<ParserElement::ref> ParserElement::getChildren(const std::string& name, const std::string& xmlns) const { std::vector<ParserElement::ref> result; std::remove_copy_if(children_.begin(), children_.end(), std::back_inserter(result), DoesntMatch(name, xmlns)); return result; } ParserElement::ref ParserElement::getChild(const std::string& name, const std::string& xmlns) const { std::vector<ParserElement::ref> results = getChildren(name, xmlns); - ParserElement::ref result = results.empty() ? boost::make_shared<NullParserElement>() : results[0]; + ParserElement::ref result = results.empty() ? NullParserElement::element : results[0]; return result; } } |