Constify language_enum
Change language_enum to take a const argument. ChangeLog 2017-09-11 Tom Tromey <tom@tromey.com> * language.h (language_enum): Make argument const. * language.c (language_enum): Make argument const.
This commit is contained in:
parent
f1735a53a6
commit
2039bd9f0c
@ -1,3 +1,8 @@
|
||||
2017-09-11 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* language.h (language_enum): Make argument const.
|
||||
* language.c (language_enum): Make argument const.
|
||||
|
||||
2017-09-11 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* common/common-utils.h (skip_to_space): Remove macro, redeclare
|
||||
|
@ -478,7 +478,7 @@ range_error (const char *string,...)
|
||||
/* Return the language enum for a given language string. */
|
||||
|
||||
enum language
|
||||
language_enum (char *str)
|
||||
language_enum (const char *str)
|
||||
{
|
||||
for (const auto &lang : languages)
|
||||
if (strcmp (lang->la_name, str) == 0)
|
||||
|
@ -562,7 +562,7 @@ extern int value_true (struct value *);
|
||||
|
||||
/* Misc: The string representing a particular enum language. */
|
||||
|
||||
extern enum language language_enum (char *str);
|
||||
extern enum language language_enum (const char *str);
|
||||
|
||||
extern const struct language_defn *language_def (enum language);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user