From 7e5b4c8530c66c478348ac66e9c508c8e5d6b9d3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Jun 2021 11:09:13 +0000 Subject: A few more "const" keyword optimizations --- macosx/tkMacOSXImage.c | 4 ++-- win/tkWinCursor.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 315ab5d..c37ca04 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -651,8 +651,8 @@ CreateCGImageFromPixmap( *---------------------------------------------------------------------- */ struct pixel_fmt {int r; int g; int b; int a;}; -static struct pixel_fmt bgra = {2, 1, 0, 3}; -static struct pixel_fmt abgr = {3, 2, 1, 0}; +static const struct pixel_fmt bgra = {2, 1, 0, 3}; +static const struct pixel_fmt abgr = {3, 2, 1, 0}; XImage * XGetImage( diff --git a/win/tkWinCursor.c b/win/tkWinCursor.c index 774eddc..8c9399a 100644 --- a/win/tkWinCursor.c +++ b/win/tkWinCursor.c @@ -39,7 +39,7 @@ typedef struct { * resource identifier. */ -static struct CursorName { +static const struct CursorName { const char *name; LPCTSTR id; } cursorNames[] = { @@ -96,7 +96,7 @@ TkGetCursorByName( Tk_Uid string) /* Description of cursor. See manual entry for * details on legal syntax. */ { - struct CursorName *namePtr; + const struct CursorName *namePtr; TkWinCursor *cursorPtr; int argc; const char **argv = NULL; -- cgit v0.12