rename variable to avoid conflict with std::string class

This commit is contained in:
Stanislav Shwartsman 2016-04-30 20:44:10 +00:00
parent e24c7e403a
commit b5d1b30f3d
2 changed files with 6 additions and 6 deletions

View File

@ -597,19 +597,19 @@ void bx_param_enum_c::set(Bit64s val)
update_dependents();
}
int bx_param_enum_c::find_by_name(const char *string)
int bx_param_enum_c::find_by_name(const char *s)
{
const char **p;
for (p=&choices[0]; *p; p++) {
if (!strcmp(string, *p))
if (!strcmp(s, *p))
return p-choices;
}
return -1;
}
bx_bool bx_param_enum_c::set_by_name(const char *string)
bx_bool bx_param_enum_c::set_by_name(const char *s)
{
int n = find_by_name(string);
int n = find_by_name(s);
if (n<0) return 0;
set(n + min);
return 1;

View File

@ -333,9 +333,9 @@ public:
virtual ~bx_param_enum_c();
const char *get_choice(int n) { return choices[n]; }
const char *get_selected() { return choices[val.number - min]; }
int find_by_name(const char *string);
int find_by_name(const char *s);
virtual void set(Bit64s val);
bx_bool set_by_name(const char *string);
bx_bool set_by_name(const char *s);
void set_dependent_list(bx_list_c *l, bx_bool enable_all);
void set_dependent_bitmap(Bit64s value, Bit64u bitmap);
Bit64u get_dependent_bitmap(Bit64s value);