refactor: PVS-Studio warnings fixes
This commit is contained in:
@@ -82,6 +82,10 @@ public:
|
||||
return defs.size();
|
||||
}
|
||||
|
||||
inline const auto& getIterable() const {
|
||||
return defs;
|
||||
}
|
||||
|
||||
inline const T* const* getDefs() const {
|
||||
return defs.data();
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ public:
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
indices.push_back(i);
|
||||
}
|
||||
for (size_t i = 0; i < unitIndices.count(); i++) {
|
||||
names.push_back(unitIndices.get(i)->name); //FIXME: .get(i) potentional null pointer //-V522
|
||||
for (auto unit : unitIndices.getIterable()) {
|
||||
names.push_back(unit->name);
|
||||
}
|
||||
for (size_t i = unitIndices.count(); i < count; i++) {
|
||||
names.emplace_back("");
|
||||
|
||||
Reference in New Issue
Block a user