Use std:unique_ptr only for Swiften >= 4.0
This commit is contained in:
parent
965198db91
commit
7d69f7108d
2 changed files with 4 additions and 1 deletions
|
@ -36,10 +36,12 @@
|
|||
*/
|
||||
|
||||
#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)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include "Swiften/SwiftenCompat.h"
|
||||
#include "Swiften/Elements/PrivateStorage.h"
|
||||
#include "Swiften/Parser/GenericPayloadParser.h"
|
||||
|
||||
|
@ -18,6 +19,6 @@ namespace Transport {
|
|||
|
||||
private:
|
||||
int level;
|
||||
std::unique_ptr<Swift::PayloadParser> currentPayloadParser;
|
||||
SWIFTEN_UNIQUE_PTR<Swift::PayloadParser> currentPayloadParser;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue