summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-02-17 11:20:52 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commitab711e6942757d775c08c31a6c32d488feba1dba (patch)
treed102dc6d0e6b9c33e7205b63e3360ebd720a3ebb /src/gfx.cpp
parent297fd3dda3abe353ebe2fe77c67b011e24d403bc (diff)
downloadopenttd-ab711e6942757d775c08c31a6c32d488feba1dba.tar.xz
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index dad675772..df3e5ccb6 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -511,7 +511,7 @@ int DrawString(int left, int right, int top, const char *str, TextColour colour,
Layouter layout(str, INT32_MAX, colour, fontsize);
if (layout.size() == 0) return 0;
- return DrawLayoutLine(*layout.Begin(), top, left, right, align, underline, true);
+ return DrawLayoutLine(layout.front(), top, left, right, align, underline, true);
}
/**
@@ -647,8 +647,7 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, const char *st
int last_line = top;
int first_line = bottom;
- for (const ParagraphLayouter::Line **iter = layout.Begin(); iter != layout.End(); iter++) {
- const ParagraphLayouter::Line *line = *iter;
+ for (const ParagraphLayouter::Line *line : layout) {
int line_height = line->GetLeading();
if (y >= top && y < bottom) {