diff options
Diffstat (limited to 'Swiften/Serializer/GenericElementSerializer.h')
-rw-r--r-- | Swiften/Serializer/GenericElementSerializer.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Swiften/Serializer/GenericElementSerializer.h b/Swiften/Serializer/GenericElementSerializer.h index 702e374..0329411 100644 --- a/Swiften/Serializer/GenericElementSerializer.h +++ b/Swiften/Serializer/GenericElementSerializer.h @@ -6,7 +6,9 @@ #pragma once -#include "Swiften/Serializer/ElementSerializer.h" +#include <boost/shared_ptr.hpp> + +#include <Swiften/Serializer/ElementSerializer.h> namespace Swift { template<typename T> @@ -15,7 +17,7 @@ namespace Swift { virtual String serialize(boost::shared_ptr<Element> element) const = 0; virtual bool canSerialize(boost::shared_ptr<Element> element) const { - return dynamic_cast<T*>(element.get()) != 0; + return boost::dynamic_pointer_cast<T>(element); } }; } |