From f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Jun 2018 12:46:15 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-nullptr=20pa?= =?UTF-8?q?ss.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer. --- src/extension/db.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/extension/db.cpp') diff --git a/src/extension/db.cpp b/src/extension/db.cpp index e885d3531..8d6ad7e0e 100644 --- a/src/extension/db.cpp +++ b/src/extension/db.cpp @@ -112,8 +112,8 @@ struct ModuleOutputCmp { void DB::register_ext (Extension *module) { - g_return_if_fail(module != NULL); - g_return_if_fail(module->get_id() != NULL); + g_return_if_fail(module != nullptr); + g_return_if_fail(module->get_id() != nullptr); // only add to list if it's a never-before-seen module bool add_to_list = @@ -134,8 +134,8 @@ DB::register_ext (Extension *module) void DB::unregister_ext (Extension * module) { - g_return_if_fail(module != NULL); - g_return_if_fail(module->get_id() != NULL); + g_return_if_fail(module != nullptr); + g_return_if_fail(module->get_id() != nullptr); // printf("Extension DB: removing %s\n", module->get_id()); moduledict.erase(moduledict.find(module->get_id())); @@ -157,11 +157,11 @@ DB::unregister_ext (Extension * module) Extension * DB::get (const gchar *key) { - if (key == NULL) return NULL; + if (key == nullptr) return nullptr; Extension *mod = moduledict[key]; if ( !mod || mod->deactivated() ) - return NULL; + return nullptr; return mod; } -- cgit v1.2.3