From 5678a4ce9eee64cafdbdb4fc1290535f9e03208f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 10 Nov 2015 10:18:58 +0100 Subject: loplugin:nullptr (automatic rewrite) Change-Id: Ibdb6409664cdf9499b6fec95c5de3549887b8106 --- libreofficekit/source/gtk/tilebuffer.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libreofficekit/source/gtk/tilebuffer.cxx') diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx index 330b44675c9c..675384c4582e 100644 --- a/libreofficekit/source/gtk/tilebuffer.cxx +++ b/libreofficekit/source/gtk/tilebuffer.cxx @@ -38,7 +38,7 @@ void Tile::setPixbuf(GdkPixbuf *buffer) if (m_pBuffer == buffer) return; g_clear_object(&m_pBuffer); - if (buffer != NULL) + if (buffer != nullptr) g_object_ref(buffer); m_pBuffer = buffer; } @@ -60,7 +60,7 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task, GThreadPool* lokThreadPool) { int index = x * m_nWidth + y; - GError* error = NULL; + GError* error = nullptr; if (m_mTiles.find(index) != m_mTiles.end()) { m_mTiles[index].valid = false; @@ -71,7 +71,7 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task, pLOEvent->m_fPaintTileZoom = fZoom; g_task_set_task_data(task, pLOEvent, LOEvent::destroy); g_thread_pool_push(lokThreadPool, g_object_ref(task), &error); - if (error != NULL) + if (error != nullptr) { g_warning("Unable to call LOK_PAINT_TILE: %s", error->message); g_clear_error(&error); @@ -83,12 +83,12 @@ Tile& TileBuffer::getTile(int x, int y, GTask* task, GThreadPool* lokThreadPool) { int index = x * m_nWidth + y; - GError* error = NULL; + GError* error = nullptr; if (m_mTiles.find(index) != m_mTiles.end() && !m_mTiles[index].valid) { g_thread_pool_push(lokThreadPool, g_object_ref(task), &error); - if (error != NULL) + if (error != nullptr) { g_warning("Unable to call LOK_PAINT_TILE: %s", error->message); g_clear_error(&error); @@ -98,7 +98,7 @@ Tile& TileBuffer::getTile(int x, int y, GTask* task, else if(m_mTiles.find(index) == m_mTiles.end()) { g_thread_pool_push(lokThreadPool, g_object_ref(task), &error); - if (error != NULL) + if (error != nullptr) { g_warning("Unable to call LOK_PAINT_TILE: %s", error->message); g_clear_error(&error); -- cgit