Mercurial > hg > dmlib
changeset 1546:228e71d66089
Constify.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 12 May 2018 21:02:10 +0300 |
parents | 3b613fcbf3ff |
children | fa4fa9a6e78f |
files | tools/gfxconv.c |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/gfxconv.c Sat May 12 21:01:46 2018 +0300 +++ b/tools/gfxconv.c Sat May 12 21:02:10 2018 +0300 @@ -55,7 +55,7 @@ } DMConvFormat; -static DMConvFormat convFormatList[] = +static const DMConvFormat convFormatList[] = { { "ASCII text" , "asc" , DM_FMT_WR , FFMT_ASCII , 0 }, { "ANSI colored text" , "ansi" , DM_FMT_WR , FFMT_ANSI , 0 }, @@ -222,12 +222,11 @@ } -int dmGetConvFormat(int format, int subformat) +int dmGetConvFormat(const int format, const int subformat) { - int i; - for (i = 0; i < nconvFormatList; i++) + for (int i = 0; i < nconvFormatList; i++) { - DMConvFormat *fmt = &convFormatList[i]; + const DMConvFormat *fmt = &convFormatList[i]; if (fmt->format == format && fmt->subformat == subformat) return i; @@ -267,7 +266,7 @@ for (i = 0; i < nconvFormatList; i++) { - DMConvFormat *fmt = &convFormatList[i]; + const DMConvFormat *fmt = &convFormatList[i]; if (fmt->fext != NULL && strcasecmp(fext, fmt->fext) == 0) {