summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-03-03 21:11:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-03-03 22:14:49 (GMT)
commit12024229138787d7df91cb8101d0986996880e3d (patch)
tree575ef4bd2104ce4a0531580ac78381dbb94f6c6e /Swiften/Parser/PayloadParsers/CommandParser.cpp
parenta8cd6a5cbf74d0db4df0b7daa8e4b1b0e0bc00d0 (diff)
downloadswift-12024229138787d7df91cb8101d0986996880e3d.zip
swift-12024229138787d7df91cb8101d0986996880e3d.tar.bz2
Some more Sluift tweaks.
Diffstat (limited to 'Swiften/Parser/PayloadParsers/CommandParser.cpp')
-rw-r--r--Swiften/Parser/PayloadParsers/CommandParser.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/Parser/PayloadParsers/CommandParser.cpp b/Swiften/Parser/PayloadParsers/CommandParser.cpp
index 9422170..3ebab39 100644
--- a/Swiften/Parser/PayloadParsers/CommandParser.cpp
+++ b/Swiften/Parser/PayloadParsers/CommandParser.cpp
@@ -5,6 +5,9 @@
*/
#include "Swiften/Parser/PayloadParsers/CommandParser.h"
+
+#include <boost/cast.hpp>
+
#include "Swiften/Parser/PayloadParsers/FormParserFactory.h"
#include "Swiften/Parser/PayloadParsers/FormParser.h"
@@ -43,7 +46,7 @@ void CommandParser::handleStartElement(const std::string& element, const std::st
else if (level_ == FormOrNoteOrActionsLevel) {
assert(!formParser_);
if (formParserFactory_->canParse(element, ns, attributes)) {
- formParser_ = dynamic_cast<FormParser*>(formParserFactory_->createPayloadParser());
+ formParser_ = boost::polymorphic_downcast<FormParser*>(formParserFactory_->createPayloadParser());
assert(formParser_);
}
else if (element == "note") {