diff OrthancStone/Sources/Scene2D/Internals/CairoTextRenderer.cpp @ 1571:85e117739eca

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Sep 2020 17:46:39 +0200
parents 244ad1e4e76a
children 4fb8fdf03314
line wrap: on
line diff
--- a/OrthancStone/Sources/Scene2D/Internals/CairoTextRenderer.cpp	Mon Sep 21 14:50:26 2020 +0200
+++ b/OrthancStone/Sources/Scene2D/Internals/CairoTextRenderer.cpp	Mon Sep 21 17:46:39 2020 +0200
@@ -38,11 +38,11 @@
       {
         text_.SetSize(source->GetWidth(), source->GetHeight(), true);
 
-        Orthanc::ImageAccessor target;
-        text_.GetWriteableAccessor(target);
+        Orthanc::ImageAccessor accessor;
+        text_.GetWriteableAccessor(accessor);
         
         if (source->GetFormat() != Orthanc::PixelFormat_Grayscale8 ||
-            target.GetFormat() != Orthanc::PixelFormat_BGRA32)
+            accessor.GetFormat() != Orthanc::PixelFormat_BGRA32)
         {
           throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
         }
@@ -53,7 +53,7 @@
         for (unsigned int y = 0; y < source->GetHeight(); y++)
         {
           const uint8_t* p = reinterpret_cast<const uint8_t*>(source->GetConstRow(y));
-          uint8_t* q = reinterpret_cast<uint8_t*>(target.GetRow(y));
+          uint8_t* q = reinterpret_cast<uint8_t*>(accessor.GetRow(y));
           
           for (unsigned int x = 0; x < width; x++)
           {