mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
Revert "fix: optimization: Various PVS-Studio warnings"
This commit is contained in:
parent
a7ef7bb365
commit
ba046a52c0
90 changed files with 259 additions and 274 deletions
|
|
@ -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[i].offset > index) {
|
||||
if (cache.lines.at(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[i];
|
||||
auto& line = cache.lines.at(i);
|
||||
size_t offset = line.offset;
|
||||
std::wstring_view view(text.c_str()+offset, text.length()-offset);
|
||||
if (i < cache.lines.size()-1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue