diff options
| author | 2016-04-30 18:23:42 +0100 | |
|---|---|---|
| committer | 2016-04-30 18:50:44 +0100 | |
| commit | 505d0768f8392e3c4775425dd97f41e1c829ef44 (patch) | |
| tree | 55dfa35f2e180b4186baf00ffbfd2ee38c0f1c18 /src/modules/spaste/libkvispaste.cpp | |
| parent | Update my clang-format to 3.8.0 (diff) | |
| download | KVIrc-505d0768f8392e3c4775425dd97f41e1c829ef44.tar.gz KVIrc-505d0768f8392e3c4775425dd97f41e1c829ef44.tar.bz2 KVIrc-505d0768f8392e3c4775425dd97f41e1c829ef44.zip | |
Apply clang-tidy: modernize-use-nullptr
Diffstat (limited to 'src/modules/spaste/libkvispaste.cpp')
| -rw-r--r-- | src/modules/spaste/libkvispaste.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/spaste/libkvispaste.cpp b/src/modules/spaste/libkvispaste.cpp index c47f9bfa8..233ae97d1 100644 --- a/src/modules/spaste/libkvispaste.cpp +++ b/src/modules/spaste/libkvispaste.cpp @@ -42,7 +42,7 @@ #include <unistd.h> #endif -KviPointerList<SlowPasteController> * g_pControllerList = 0; +KviPointerList<SlowPasteController> * g_pControllerList = nullptr; int ctrlId = 0; static SlowPasteController * spaste_find_controller(KviWindow * w) @@ -52,7 +52,7 @@ static SlowPasteController * spaste_find_controller(KviWindow * w) if(spc->window() == w) return spc; } - return 0; + return nullptr; } static KviWindow * spaste_kvs_find_window(QString & win, KviKvsModuleCommandCall * c) @@ -65,12 +65,12 @@ static KviWindow * spaste_kvs_find_window(QString & win, KviKvsModuleCommandCall if(!w) { c->warning(__tr("Window with ID '%Q' not found"), &win); - return 0; + return nullptr; } if((w->type() == KviWindow::Channel) || (w->type() == KviWindow::Query) || (w->type() == KviWindow::DccChat)) return w; c->warning(__tr2qs("The specified window (%Q) is not a channel/query/DCC chat"), &win); - return 0; + return nullptr; } /* @@ -231,7 +231,7 @@ static bool spaste_kvs_cmd_stop(KviKvsModuleCommandCall * c) } else { - while((item = it.current()) != 0) + while((item = it.current()) != nullptr) { ++it; if(KviQString::equalCS(item->window()->id(), c->window()->id())) @@ -242,7 +242,7 @@ static bool spaste_kvs_cmd_stop(KviKvsModuleCommandCall * c) else { //Delete the spaste with the given id - while((item = it.current()) != 0) + while((item = it.current()) != nullptr) { ++it; if(item->getId() == (kvs_int_t)iId) @@ -277,7 +277,7 @@ static bool spaste_kvs_cmd_list(KviKvsModuleCommandCall * c) KviPointerListIterator<SlowPasteController> it(*g_pControllerList); SlowPasteController * item; - while((item = it.current()) != 0) + while((item = it.current()) != nullptr) { ++it; QString szWinId = item->window()->id(); @@ -332,7 +332,7 @@ static bool spaste_module_cleanup(KviModule *) while(g_pControllerList->first()) delete g_pControllerList->first(); delete g_pControllerList; - g_pControllerList = 0; + g_pControllerList = nullptr; return true; } |
