fix readability-*:
* readability-const-return-type * readability-container-data-pointer * readability-container-size-empty * readability-delete-null-pointer * readability-else-after-return * readability-inconsistent-declaration-parameter-name * readability-redundant-member-init * readability-redundant-smartptr-get * readability-redundant-string-cstr * readability-use-anyofallof * readability-static-definition-in-anonymous-namespace * readability-static-accessed-through-instance * readability-simplify-boolean-expr
This commit is contained in:
@@ -43,12 +43,11 @@ struct string_comp
|
||||
if (s1.size() < s2.size()) {
|
||||
return true;
|
||||
}
|
||||
else if (s1.size() > s2.size()) {
|
||||
if (s1.size() > s2.size()) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return s1 < s2;
|
||||
}
|
||||
|
||||
return s1 < s2;
|
||||
}
|
||||
static std::string increment(const std::string& s)
|
||||
{
|
||||
@@ -105,7 +104,7 @@ private:
|
||||
for (const auto& name : names) {
|
||||
if (name.substr(0, base_name.length()) == base_name) { // same prefix
|
||||
std::string suffix(name.substr(base_name.length()));
|
||||
if (suffix.size() > 0) {
|
||||
if (!suffix.empty()) {
|
||||
std::string::size_type pos = suffix.find_first_not_of("0123456789");
|
||||
if (pos == std::string::npos) {
|
||||
num_suffix = std::max<std::string>(num_suffix, suffix, Base::string_comp());
|
||||
|
||||
Reference in New Issue
Block a user