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/trace/siox.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/trace/siox.cpp') diff --git a/src/trace/siox.cpp b/src/trace/siox.cpp index 9df4e561c..9501da3c4 100644 --- a/src/trace/siox.cpp +++ b/src/trace/siox.cpp @@ -344,8 +344,8 @@ SioxImage::SioxImage(unsigned int widthArg, unsigned int heightArg) */ SioxImage::SioxImage(const SioxImage &other) { - pixdata = NULL; - cmdata = NULL; + pixdata = nullptr; + cmdata = nullptr; assign(other); } @@ -654,14 +654,14 @@ GdkPixbuf *SioxImage::getGdkPixbuf() guchar *pixdata = (guchar *) malloc(sizeof(guchar) * width * height * n_channels); if (!pixdata) - return NULL; + return nullptr; int rowstride = width * n_channels; GdkPixbuf *buf = gdk_pixbuf_new_from_data(pixdata, GDK_COLORSPACE_RGB, has_alpha, 8, width, height, - rowstride, NULL, NULL); + rowstride, nullptr, nullptr); //### Fill in the cells with RGB values int row = 0; @@ -728,14 +728,14 @@ const float Siox::CERTAIN_BACKGROUND_CONFIDENCE=0.0f; * Construct a Siox engine */ Siox::Siox() : - sioxObserver(0), + sioxObserver(nullptr), keepGoing(true), width(0), height(0), pixelCount(0), - image(0), - cm(0), - labelField(0) + image(nullptr), + cm(nullptr), + labelField(nullptr) { init(); } @@ -749,9 +749,9 @@ Siox::Siox(SioxObserver *observer) : width(0), height(0), pixelCount(0), - image(0), - cm(0), - labelField(0) + image(nullptr), + cm(nullptr), + labelField(nullptr) { init(); } -- cgit v1.2.3