diff options
author | Tobias Markmann <tm@ayena.de> | 2012-03-20 00:05:55 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-03-20 19:13:43 (GMT) |
commit | 3d6694b0c698fff63d11f8bb4aa995c1df882315 (patch) | |
tree | a46ccace647f23a65100cf69c951345aa6dea7ab /Swiften/Parser/UnitTest/StanzaParserTest.cpp | |
parent | 3d27d98ccc232ae7bfacfd5a3f85f44b6c2e9cc9 (diff) | |
download | swift-contrib-3d6694b0c698fff63d11f8bb4aa995c1df882315.zip swift-contrib-3d6694b0c698fff63d11f8bb4aa995c1df882315.tar.bz2 |
boost::shared_ptr<?>(new ?(...)) -> boost::make_shared<?>(...) transformation where possible.
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swiften/Parser/UnitTest/StanzaParserTest.cpp')
-rw-r--r-- | Swiften/Parser/UnitTest/StanzaParserTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/Parser/UnitTest/StanzaParserTest.cpp b/Swiften/Parser/UnitTest/StanzaParserTest.cpp index b2ddb39..88e6dec 100644 --- a/Swiften/Parser/UnitTest/StanzaParserTest.cpp +++ b/Swiften/Parser/UnitTest/StanzaParserTest.cpp @@ -161,52 +161,52 @@ class StanzaParserTest : public CppUnit::TestFixture { }; class MyPayload2Parser : public GenericPayloadParser<MyPayload2> { public: MyPayload2Parser() {} virtual void handleStartElement(const std::string&, const std::string&, const AttributeMap&) {} virtual void handleEndElement(const std::string&, const std::string&) {} virtual void handleCharacterData(const std::string&) {} }; class MyPayload2ParserFactory : public PayloadParserFactory { public: MyPayload2ParserFactory() {} PayloadParser* createPayloadParser() { return new MyPayload2Parser(); } bool canParse(const std::string& element, const std::string&, const AttributeMap&) const { return element == "mypayload2"; } }; class MyStanza : public Stanza { public: MyStanza() {} }; class MyStanzaParser : public StanzaParser { public: MyStanzaParser(PayloadParserFactoryCollection* collection) : StanzaParser(collection) { - stanza_ = boost::shared_ptr<MyStanza>(new MyStanza()); + stanza_ = boost::make_shared<MyStanza>(); } virtual boost::shared_ptr<Element> getElement() const { return stanza_; } private: boost::shared_ptr<MyStanza> stanza_; }; MyPayload1ParserFactory factory1_; MyPayload2ParserFactory factory2_; PayloadParserFactoryCollection* factoryCollection_; }; CPPUNIT_TEST_SUITE_REGISTRATION(StanzaParserTest); |