mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix: optimization: PVS-Studio warning V836
Expression's value is copied at variable declaration. The variable is never modified. Consider declaring it as a reference. Changed variables to be a reference to avoid unnecessary copy. Reported by: PVS-Studio Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
parent
50a388c539
commit
73e721513c
2 changed files with 2 additions and 2 deletions
|
|
@ -85,7 +85,7 @@ bool ContentLoader::fixPackIndices(
|
|||
indexed.push_back(name);
|
||||
}
|
||||
}
|
||||
for (auto name : detected) {
|
||||
for (const auto &name : detected) {
|
||||
if (!util::contains(indexed, name)) {
|
||||
arr->put(name);
|
||||
modified = true;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ static void _readPanel(UiXmlReader& reader, const xml::xmlelement& element, Pane
|
|||
panel.setMaxLength(element->attr("max-length").asInt());
|
||||
}
|
||||
if (element->has("orientation")) {
|
||||
auto oname = element->attr("orientation").getText();
|
||||
const auto &oname = element->attr("orientation").getText();
|
||||
if (oname == "horizontal") {
|
||||
panel.setOrientation(Orientation::horizontal);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue