Changeset - 7d69f7108d72
[Not reviewed]
0 2 0
Steffen Vogel - 8 years ago 2017-10-30 15:47:40
post@steffenvogel.de
Use std:unique_ptr only for Swiften >= 4.0
2 files changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
include/Swiften/SwiftenCompat.h
Show inline comments
 
@@ -33,14 +33,16 @@
 
 *
 
 * This is due to Swift 4 moved from boost::shared_ptr to SWIFTEN_SHRPTR_NAMESPACE::shared_ptr
 
 * and from boost::signals to boost::signals2 .
 
 */
 

	
 
#if (SWIFTEN_VERSION >= 0x040000)
 
#define SWIFTEN_UNQPTR std::unique_ptr
 
#define SWIFTEN_SHRPTR_NAMESPACE std
 
#define SWIFTEN_SIGNAL_NAMESPACE boost::signals2
 
#define SWIFT_HOSTADDRESS(x) *(Swift::HostAddress::fromString(x))
 
#else
 
#define SWIFTEN_UNQPTR std::auto_ptr
 
#define SWIFTEN_SHRPTR_NAMESPACE boost
 
#define SWIFTEN_SIGNAL_NAMESPACE boost::signals
 
#define SWIFT_HOSTADDRESS(x) Swift::HostAddress(x)
 
#endif
spectrum/src/frontends/xmpp/storageparser.h
Show inline comments
 
#pragma once
 

	
 
#include <boost/optional.hpp>
 

	
 
#include "Swiften/SwiftenCompat.h"
 
#include "Swiften/Elements/PrivateStorage.h"
 
#include "Swiften/Parser/GenericPayloadParser.h"
 

	
 
namespace Transport {
 

	
 
	class StorageParser : public Swift::GenericPayloadParser<Swift::PrivateStorage> {
 
@@ -15,9 +16,9 @@ namespace Transport {
 
			virtual void handleStartElement(const std::string& element, const std::string&, const Swift::AttributeMap& attributes);
 
			virtual void handleEndElement(const std::string& element, const std::string&);
 
			virtual void handleCharacterData(const std::string& data);
 

	
 
		private:
 
			int level;
 
			std::unique_ptr<Swift::PayloadParser> currentPayloadParser;
 
			SWIFTEN_UNIQUE_PTR<Swift::PayloadParser> currentPayloadParser;
 
	};
 
}
0 comments (0 inline, 0 general)