Skip to content

Commit

Permalink
shmauth - use internal standard function to split a string
Browse files Browse the repository at this point in the history
  • Loading branch information
astibal committed Jul 15, 2024
1 parent 2fa42cd commit c1fb3f5
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/shm/shmauth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,22 +259,9 @@ struct IdentityInfoType : public IdentityInfoBase {

int pos = 0;
int old_pos = 0;
while(true) {
pos = groups.find("+",pos);
if(pos > old_pos && pos != static_cast<int>(std::string::npos)) {
std::string x = groups.substr(old_pos,pos-old_pos);
groups_vec.push_back(x);

old_pos = pos + 1;
pos++;
groups.find('+',pos);
} else {
std::string x = groups.substr(old_pos,groups.size()-old_pos);
groups_vec.push_back(x);
break;
}
}
}

groups_vec = string_split(groups, '+');
}
};


Expand Down

0 comments on commit c1fb3f5

Please sign in to comment.