From 33425752728cef43c566a2ace5a54a3a31f6b36f Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 2 Feb 2014 15:29:29 -0600 Subject: copyediting: use 'nullptr' instead of 'NULL' in c++ source --- src/actions-live.cpp | 2 +- src/menu.cpp | 2 +- tests/geoclue-fixture.h | 2 +- tests/test-clock.cpp | 4 ++-- tests/test-settings.cpp | 4 ++-- tests/test-utils.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/actions-live.cpp b/src/actions-live.cpp index c0fd8ff..32d41ad 100644 --- a/src/actions-live.cpp +++ b/src/actions-live.cpp @@ -160,7 +160,7 @@ on_datetime1_proxy_ready (GObject * object G_GNUC_UNUSED, GError * err = nullptr; auto proxy = g_dbus_proxy_new_for_bus_finish(res, &err); - if (err != NULL) + if (err != nullptr) { if (!g_error_matches(err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) g_warning("Could not grab DBus proxy for timedated: %s", err->message); diff --git a/src/menu.cpp b/src/menu.cpp index 91f7dd2..b3dcc53 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -270,7 +270,7 @@ private: // add calendar if (show_calendar) { - item = g_menu_item_new ("[calendar]", NULL); + item = g_menu_item_new ("[calendar]", nullptr); v = g_variant_new_int64(0); g_menu_item_set_action_and_target_value (item, "indicator.calendar", v); g_menu_item_set_attribute (item, "x-canonical-type", diff --git a/tests/geoclue-fixture.h b/tests/geoclue-fixture.h index 7e29018..0c597d3 100644 --- a/tests/geoclue-fixture.h +++ b/tests/geoclue-fixture.h @@ -95,7 +95,7 @@ class GeoclueFixture : public GlibFixture // I've looked and can't find where this extra ref is coming from. // is there an unbalanced ref to the bus in the test harness?! - while (bus != NULL) + while (bus != nullptr) { g_object_unref (bus); wait_msec (1000); diff --git a/tests/test-clock.cpp b/tests/test-clock.cpp index 4287e1c..a4924b3 100644 --- a/tests/test-clock.cpp +++ b/tests/test-clock.cpp @@ -37,12 +37,12 @@ class ClockFixture: public TestDBusFixture void emitPrepareForSleep() { g_dbus_connection_emit_signal(g_bus_get_sync(G_BUS_TYPE_SYSTEM, nullptr, nullptr), - NULL, + nullptr, "/org/freedesktop/login1", // object path "org.freedesktop.login1.Manager", // interface "PrepareForSleep", // signal name g_variant_new("(b)", FALSE), - NULL); + nullptr); } }; diff --git a/tests/test-settings.cpp b/tests/test-settings.cpp index 980e7fa..707247d 100644 --- a/tests/test-settings.cpp +++ b/tests/test-settings.cpp @@ -167,8 +167,8 @@ TEST_F(SettingsFixture, Locations) { const auto key = SETTINGS_LOCATIONS_S; - const gchar* astrv[] = {"America/Los_Angeles Oakland", "America/Chicago Oklahoma City", "Europe/London London", NULL}; - const gchar* bstrv[] = {"America/Denver", "Europe/London London", "Europe/Berlin Berlin", NULL}; + const gchar* astrv[] = {"America/Los_Angeles Oakland", "America/Chicago Oklahoma City", "Europe/London London", nullptr}; + const gchar* bstrv[] = {"America/Denver", "Europe/London London", "Europe/Berlin Berlin", nullptr}; const std::vector av = strv_to_vector(astrv); const std::vector bv = strv_to_vector(bstrv); diff --git a/tests/test-utils.cpp b/tests/test-utils.cpp index 036c13f..97f07ed 100644 --- a/tests/test-utils.cpp +++ b/tests/test-utils.cpp @@ -59,7 +59,7 @@ namespace const char* location; const char* expected_name; } beautify_timezone_test_cases[] = { - { "America/Chicago", NULL, "Chicago" }, + { "America/Chicago", nullptr, "Chicago" }, { "America/Chicago", "America/Chicago", "Chicago" }, { "America/Chicago", "America/Chigago Chicago", "Chicago" }, { "America/Chicago", "America/Chicago Oklahoma City", "Oklahoma City" }, -- cgit v1.2.3