Remove redundant checks
This commit is contained in:
parent
b3f8a5a7c0
commit
b2ca410252
1 changed files with 2 additions and 3 deletions
|
@ -48,9 +48,8 @@ namespace {
|
|||
|
||||
bool addon_name_legal(const std::string& name)
|
||||
{
|
||||
if(name.empty() || name == "." ||
|
||||
std::find_if(name.begin(), name.end(), addon_name_char_illegal()) != name.end() ||
|
||||
name.find("..") != std::string::npos) {
|
||||
if(name.empty() ||
|
||||
std::find_if(name.begin(), name.end(), addon_name_char_illegal()) != name.end()) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue