diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-10 20:47:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-11 11:20:43 +0200 |
commit | 2d582244680e7f6dec6e4a466e276f93ccb01dc9 (patch) | |
tree | b0e880ddfb3ce1ea2f47151b648e7fbb55132f08 /libreofficekit/source | |
parent | 74012c48d99634a7556a86f77e9522024f2afdb2 (diff) |
loplugin:flatten
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'libreofficekit/source')
-rw-r--r-- | libreofficekit/source/gtk/tilebuffer.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx index 82f0253d9e82..6836031661bc 100644 --- a/libreofficekit/source/gtk/tilebuffer.cxx +++ b/libreofficekit/source/gtk/tilebuffer.cxx @@ -61,21 +61,21 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task, { int index = x * m_nWidth + y; GError* error = nullptr; - if (m_mTiles.find(index) != m_mTiles.end()) - { - m_mTiles[index].valid = false; + if (m_mTiles.find(index) == m_mTiles.end()) + return; - LOEvent* pLOEvent = new LOEvent(LOK_PAINT_TILE); - pLOEvent->m_nPaintTileX = x; - pLOEvent->m_nPaintTileY = y; - 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 != nullptr) - { - g_warning("Unable to call LOK_PAINT_TILE: %s", error->message); - g_clear_error(&error); - } + m_mTiles[index].valid = false; + + LOEvent* pLOEvent = new LOEvent(LOK_PAINT_TILE); + pLOEvent->m_nPaintTileX = x; + pLOEvent->m_nPaintTileY = y; + 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 != nullptr) + { + g_warning("Unable to call LOK_PAINT_TILE: %s", error->message); + g_clear_error(&error); } } |