accept const std::string as argument in Group::find()

This commit is contained in:
Axel Kohlmeyer
2020-07-17 21:26:53 -04:00
parent 0e6531e2b6
commit 93ed07f445
2 changed files with 3 additions and 3 deletions

View File

@ -584,10 +584,10 @@ void Group::create(char *name, int *flag)
return group index if name matches existing group, -1 if no such group
------------------------------------------------------------------------- */
int Group::find(const char *name)
int Group::find(const std::string &name)
{
for (int igroup = 0; igroup < MAX_GROUP; igroup++)
if (names[igroup] && strcmp(name,names[igroup]) == 0) return igroup;
if (names[igroup] && (name == names[igroup])) return igroup;
return -1;
}