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 /Swift/Controllers/HistoryViewController.cpp
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 'Swift/Controllers/HistoryViewController.cpp')
-rw-r--r--Swift/Controllers/HistoryViewController.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Swift/Controllers/HistoryViewController.cpp b/Swift/Controllers/HistoryViewController.cpp
index d0ccc66..827d7d6 100644
--- a/Swift/Controllers/HistoryViewController.cpp
+++ b/Swift/Controllers/HistoryViewController.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* Licensed under the GNU General Public License.
* See the COPYING file for more information.
*/
@@ -42,8 +42,8 @@ HistoryViewController::HistoryViewController(
avatarManager_(avatarManager),
presenceOracle_(presenceOracle),
historyWindowFactory_(historyWindowFactory),
- historyWindow_(NULL),
- selectedItem_(NULL),
+ historyWindow_(nullptr),
+ selectedItem_(nullptr),
currentResultDate_(boost::gregorian::not_a_date_time) {
uiEventStream_->onUIEvent.connect(boost::bind(&HistoryViewController::handleUIEvent, this, _1));
@@ -72,8 +72,8 @@ HistoryViewController::~HistoryViewController() {
void HistoryViewController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent) {
boost::shared_ptr<RequestHistoryUIEvent> event = boost::dynamic_pointer_cast<RequestHistoryUIEvent>(rawEvent);
- if (event != NULL) {
- if (historyWindow_ == NULL) {
+ if (event != nullptr) {
+ if (historyWindow_ == nullptr) {
historyWindow_ = historyWindowFactory_->createHistoryWindow(uiEventStream_);
historyWindow_->onSelectedContactChanged.connect(boost::bind(&HistoryViewController::handleSelectedContactChanged, this, _1));
historyWindow_->onReturnPressed.connect(boost::bind(&HistoryViewController::handleReturnPressed, this, _1));
@@ -266,7 +266,7 @@ void HistoryViewController::handlePreviousButtonClicked() {
void HistoryViewController::reset() {
roster_->removeAll();
contacts_.clear();
- selectedItem_ = NULL;
+ selectedItem_ = nullptr;
historyWindow_->resetConversationView();
}