summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-01 12:36:16 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-01 15:56:34 (GMT)
commiteddd92ed76ae68cb1e202602fd3ebd11b69191a2 (patch)
tree8d396e5801d77a2f0ee4ab8e4c5093d8cf8118e6 /Swiften/Serializer
parenta79db8d446e152b715f435550c2a6e10a36ee532 (diff)
downloadswift-eddd92ed76ae68cb1e202602fd3ebd11b69191a2.zip
swift-eddd92ed76ae68cb1e202602fd3ebd11b69191a2.tar.bz2
Modernize code to use C++11 nullptr using clang-tidy
Run 'clang-tidy -fix -checks=modernize-use-nullptr' on all source code files on OS X. This does not modernize platform specific code on Linux and Windows Test-Information: Code builds and unit tests pass on OS X 10.11.4. Change-Id: Ic43ffeb1b76c1a933a55af03db3c54977f5f60dd
Diffstat (limited to 'Swiften/Serializer')
-rw-r--r--Swiften/Serializer/CompressRequestSerializer.cpp4
-rw-r--r--Swiften/Serializer/GenericStanzaSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializerCollection.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Serializer/CompressRequestSerializer.cpp b/Swiften/Serializer/CompressRequestSerializer.cpp
index c053cca..e6bc4ff 100644
--- a/Swiften/Serializer/CompressRequestSerializer.cpp
+++ b/Swiften/Serializer/CompressRequestSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -19,7 +19,7 @@ SafeByteArray CompressRequestSerializer::serialize(boost::shared_ptr<ToplevelEle
}
bool CompressRequestSerializer::canSerialize(boost::shared_ptr<ToplevelElement> element) const {
- return boost::dynamic_pointer_cast<CompressRequest>(element) != 0;
+ return boost::dynamic_pointer_cast<CompressRequest>(element) != nullptr;
}
}
diff --git a/Swiften/Serializer/GenericStanzaSerializer.h b/Swiften/Serializer/GenericStanzaSerializer.h
index e3eaae6..32fcbe9 100644
--- a/Swiften/Serializer/GenericStanzaSerializer.h
+++ b/Swiften/Serializer/GenericStanzaSerializer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -16,7 +16,7 @@ namespace Swift {
GenericStanzaSerializer(const std::string& tag, PayloadSerializerCollection* payloadSerializers, const boost::optional<std::string>& explicitNS = boost::optional<std::string>()) : StanzaSerializer(tag, payloadSerializers, explicitNS) {}
virtual bool canSerialize(boost::shared_ptr<ToplevelElement> element) const {
- return dynamic_cast<STANZA_TYPE*>(element.get()) != 0;
+ return dynamic_cast<STANZA_TYPE*>(element.get()) != nullptr;
}
virtual void setStanzaSpecificAttributes(
diff --git a/Swiften/Serializer/PayloadSerializerCollection.cpp b/Swiften/Serializer/PayloadSerializerCollection.cpp
index ba8b191..05fe445 100644
--- a/Swiften/Serializer/PayloadSerializerCollection.cpp
+++ b/Swiften/Serializer/PayloadSerializerCollection.cpp
@@ -29,7 +29,7 @@ PayloadSerializer* PayloadSerializerCollection::getPayloadSerializer(boost::shar
std::vector<PayloadSerializer*>::const_iterator i = std::find_if(
serializers_.begin(), serializers_.end(),
boost::bind(&PayloadSerializer::canSerialize, _1, payload));
- return (i != serializers_.end() ? *i : NULL);
+ return (i != serializers_.end() ? *i : nullptr);
}
}