chore:fixed some codeql warnings
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
9a57fddaaf
commit
f7fd6f566f
36 changed files with 176 additions and 217 deletions
|
@ -105,19 +105,16 @@ std::pair<Version, Version> DataPack::compatibleVersions() const
|
|||
int DataPack::compare(const Resource& other, SortType type) const
|
||||
{
|
||||
auto const& cast_other = static_cast<DataPack const&>(other);
|
||||
switch (type) {
|
||||
default:
|
||||
return Resource::compare(other, type);
|
||||
case SortType::PACK_FORMAT: {
|
||||
auto this_ver = packFormat();
|
||||
auto other_ver = cast_other.packFormat();
|
||||
if (type == SortType::PACK_FORMAT) {
|
||||
auto this_ver = packFormat();
|
||||
auto other_ver = cast_other.packFormat();
|
||||
|
||||
if (this_ver > other_ver)
|
||||
return 1;
|
||||
if (this_ver < other_ver)
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
if (this_ver > other_ver)
|
||||
return 1;
|
||||
if (this_ver < other_ver)
|
||||
return -1;
|
||||
} else {
|
||||
return Resource::compare(other, type);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue