From 337c279215fa6daf12a1cd1370bcbf10db809bb0 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Fri, 1 May 2015 13:15:22 +0200 Subject: Make data tables const. Moves some of them to the .rodata section, the rest at least to .data.rel.ro[.local]. Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045 Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira Reviewed-by: Giuseppe D'Angelo --- src/gui/painting/qdrawhelper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/painting/qdrawhelper.cpp') diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 37f2de98b6..d34b2b9a44 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -675,7 +675,7 @@ QPixelLayout qPixelLayouts[QImage::NImageFormats] = { { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP8, convertGrayscale8ToRGB32, convertGrayscale8FromARGB32PM, convertGrayscale8FromRGB32 } // Format_Grayscale8 }; -FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = { +const FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = { 0, // BPPNone fetchPixels, // BPP1MSB fetchPixels, // BPP1LSB @@ -685,7 +685,7 @@ FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = { fetchPixels // BPP32 }; -StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = { +const StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = { 0, // BPPNone storePixels, // BPP1MSB storePixels, // BPP1LSB @@ -697,7 +697,7 @@ StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = { typedef uint (QT_FASTCALL *FetchPixelFunc)(const uchar *src, int index); -FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = { +static const FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = { 0, // BPPNone fetchPixel, // BPP1MSB fetchPixel, // BPP1LSB -- cgit v1.2.3