diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-04-30 15:31:33 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-04-30 15:31:33 +0200 |
commit | 759b931447a4daa14ed02dee9b12d46ddb3037f0 (patch) | |
tree | 029b04417fc523f4e4af7d2c53696daa68c079c1 | |
parent | a0c93eda2c5c8aad758a6faa156241ea9fddb37d (diff) |
Replace NULL by nullptr
* cairomm/surface.cc:
* tests/test-font-face.cc:
* tests/test-scaled-font.cc: Replace NULL by nullptr
* cairomm/surface.h: Remove the "#ifdef nil" section. It's not necessary.
Cairomm-1.16 depends on libsigc++-3.0. Only libsigc++-2.0 defines nil.
-rw-r--r-- | cairomm/surface.cc | 2 | ||||
-rw-r--r-- | cairomm/surface.h | 10 | ||||
-rw-r--r-- | tests/test-font-face.cc | 4 | ||||
-rw-r--r-- | tests/test-scaled-font.cc | 4 |
4 files changed, 5 insertions, 15 deletions
diff --git a/cairomm/surface.cc b/cairomm/surface.cc index be31b65..d7b9708 100644 --- a/cairomm/surface.cc +++ b/cairomm/surface.cc @@ -376,7 +376,7 @@ RecordingSurface::~RecordingSurface() RefPtr<RecordingSurface> RecordingSurface::create(Content content) { - auto cobject = cairo_recording_surface_create((cairo_content_t)content, NULL); + auto cobject = cairo_recording_surface_create((cairo_content_t)content, nullptr); check_status_and_throw_exception(cairo_surface_status(cobject)); return make_refptr_for_instance<RecordingSurface>(new RecordingSurface(cobject, true /* has reference */)); } diff --git a/cairomm/surface.h b/cairomm/surface.h index b80c2f7..56e5df4 100644 --- a/cairomm/surface.h +++ b/cairomm/surface.h @@ -22,17 +22,7 @@ #include <string> #include <vector> -/* following is required for OS X */ - -#ifdef nil -#undef nil -#include <sigc++/slot.h> -#define nil NULL -#else #include <sigc++/slot.h> -#endif - -/* end OS X */ #include <cairomm/enums.h> #include <cairomm/exception.h> diff --git a/tests/test-font-face.cc b/tests/test-font-face.cc index 7fe6fd9..0f3571c 100644 --- a/tests/test-font-face.cc +++ b/tests/test-font-face.cc @@ -62,10 +62,10 @@ BOOST_AUTO_TEST_CASE(test_ft_font_face) // using so just create an empty pattern and do the minimal substitution to // get a valid pattern auto pattern = FcPatternCreate(); - FcConfigSubstitute (NULL, pattern, FcMatchPattern); + FcConfigSubstitute (nullptr, pattern, FcMatchPattern); FcDefaultSubstitute (pattern); FcResult result; - auto resolved = FcFontMatch (NULL, pattern, &result); + auto resolved = FcFontMatch (nullptr, pattern, &result); auto face = Cairo::FtFontFace::create(resolved); BOOST_CHECK(face); diff --git a/tests/test-scaled-font.cc b/tests/test-scaled-font.cc index 2ac4674..d6b861b 100644 --- a/tests/test-scaled-font.cc +++ b/tests/test-scaled-font.cc @@ -83,10 +83,10 @@ BOOST_AUTO_TEST_CASE(test_ft_scaled_font) // using so just create an empty pattern and do the minimal substitution to // get a valid pattern auto pattern = FcPatternCreate(); - FcConfigSubstitute (NULL, pattern, FcMatchPattern); + FcConfigSubstitute (nullptr, pattern, FcMatchPattern); FcDefaultSubstitute (pattern); FcResult result; - auto resolved = FcFontMatch (NULL, pattern, &result); + auto resolved = FcFontMatch (nullptr, pattern, &result); auto face = Cairo::FtFontFace::create(resolved); BOOST_CHECK(face); |