refactor: server/Config to the variable initializer and condition part of the for loop when checking for a valid screen name
This commit is contained in:
committed by
Chris Rizzitello
parent
e24b1c4b68
commit
647201cd37
@ -328,13 +328,7 @@ bool Config::isValidScreenName(const std::string &name) const
|
||||
}
|
||||
|
||||
// check each dot separated part
|
||||
std::string::size_type b = 0;
|
||||
for (;;) {
|
||||
// accept trailing .
|
||||
if (b == name.size()) {
|
||||
break;
|
||||
}
|
||||
|
||||
for (std::string::size_type b = 0; b == name.size();) {
|
||||
// find end of part
|
||||
std::string::size_type e = name.find('.', b);
|
||||
if (e == std::string::npos) {
|
||||
|
||||
Reference in New Issue
Block a user