Make some arrays const.
This commit is contained in:
@@ -240,7 +240,7 @@ void SplitAddAttr (Collection* C, const char* Combined, const char* Name)
|
||||
|
||||
|
||||
|
||||
Collection* ParseAttrList (const char* List, const char** NameList, unsigned NameCount)
|
||||
Collection* ParseAttrList (const char* List, const char* const* NameList, unsigned NameCount)
|
||||
/* Parse a list containing name/value pairs into a sorted collection. Some
|
||||
** attributes may not need a name, so NameList contains these names. If there
|
||||
** were no errors, the function returns a alphabetically sorted collection
|
||||
|
||||
@@ -111,7 +111,7 @@ void SplitAddAttr (Collection* C, const char* Combined, const char* Name);
|
||||
** Name is NULL, terminate with an error.
|
||||
*/
|
||||
|
||||
Collection* ParseAttrList (const char* List, const char** NameList, unsigned NameCount);
|
||||
Collection* ParseAttrList (const char* List, const char* const* NameList, unsigned NameCount);
|
||||
/* Parse a list containing name/value pairs into a sorted collection. Some
|
||||
** attributes may not need a name, so NameList contains these names. If there
|
||||
** were no errors, the function returns a alphabetically sorted collection
|
||||
|
||||
@@ -141,7 +141,7 @@ static void SetOutputData (StrBuf* N)
|
||||
static void OptConvertTo (const char* Opt attribute ((unused)), const char* Arg)
|
||||
/* Convert the bitmap into a target format */
|
||||
{
|
||||
static const char* NameList[] = {
|
||||
static const char* const NameList[] = {
|
||||
"format"
|
||||
};
|
||||
|
||||
@@ -220,7 +220,7 @@ static void OptPop (const char* Opt attribute ((unused)),
|
||||
static void OptRead (const char* Opt attribute ((unused)), const char* Arg)
|
||||
/* Read an input file */
|
||||
{
|
||||
static const char* NameList[] = {
|
||||
static const char* const NameList[] = {
|
||||
"name", "format"
|
||||
};
|
||||
|
||||
@@ -294,7 +294,7 @@ static void OptVersion (const char* Opt attribute ((unused)),
|
||||
static void OptWrite (const char* Opt attribute ((unused)), const char* Arg)
|
||||
/* Write an output file */
|
||||
{
|
||||
static const char* NameList[] = {
|
||||
static const char* const NameList[] = {
|
||||
"name", "format"
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user