diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index 56887994..384a54a9 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -253,7 +253,7 @@ speakerid_t audio::play( if (!sound->variants.empty()) { size_t index = rand() % (sound->variants.size() + 1); if (index < sound->variants.size()) { - sound = sound->variants.at(index).get(); + sound = sound->variants[index].get(); } } auto speaker_ptr = sound->newInstance(priority, channel); diff --git a/src/graphics/ui/elements/Label.cpp b/src/graphics/ui/elements/Label.cpp index ac31e2a9..e2fd44db 100644 --- a/src/graphics/ui/elements/Label.cpp +++ b/src/graphics/ui/elements/Label.cpp @@ -145,7 +145,7 @@ uint Label::getLineByYOffset(int offset) const { uint Label::getLineByTextIndex(size_t index) const { for (size_t i = 0; i < cache.lines.size(); i++) { - if (cache.lines.at(i).offset > index) { + if (cache.lines[i].offset > index) { return i-1; } } @@ -195,7 +195,7 @@ void Label::draw(const DrawContext* pctx, Assets* assets) { if (multiline) { for (size_t i = 0; i < cache.lines.size(); i++) { - auto& line = cache.lines.at(i); + auto& line = cache.lines[i]; size_t offset = line.offset; std::wstring_view view(text.c_str()+offset, text.length()-offset); if (i < cache.lines.size()-1) { diff --git a/src/graphics/ui/gui_xml.cpp b/src/graphics/ui/gui_xml.cpp index 637b2220..7b0bd0d5 100644 --- a/src/graphics/ui/gui_xml.cpp +++ b/src/graphics/ui/gui_xml.cpp @@ -286,7 +286,7 @@ static std::shared_ptr readButton(UiXmlReader& reader, const xml::xmlele std::shared_ptr