mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 10:43:44 +01:00
Restore removed <algorithm> includes.
Turns out these were needed after all. For some reason, on Windows and Mac, <algorithm> gets auto-included by something else so I don't notice when it's missing, and MSVC's include dependency tracker doesn't see it either.
This commit is contained in:
1 parent
fb76bd6722
commit
c91169e702
34 files changed
+53
-19
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "Common/System/Display.h"
|
||||
@@ -578,7 +579,7 @@ void DrawBuffer::DrawTextRect(FontID font, std::string_view text, float x, float
|
||||
float totalWidth, totalHeight;
|
||||
MeasureTextRect(font, toDraw, Bounds(x, y, w, h), &totalWidth, &totalHeight, align);
|
||||
|
||||
std::vector<std::string> lines;
|
||||
std::vector<std::string_view> lines;
|
||||
SplitString(toDraw, '\n', lines);
|
||||
|
||||
float baseY = y;
|
||||
@@ -591,7 +592,7 @@ void DrawBuffer::DrawTextRect(FontID font, std::string_view text, float x, float
|
||||
}
|
||||
|
||||
// This allows each line to be horizontally centered by itself.
|
||||
for (const std::string &line : lines) {
|
||||
for (std::string_view line : lines) {
|
||||
DrawText(font, line, x, baseY, color, align);
|
||||
|
||||
float tw, th;
|
||||
|
||||
Reference in new issue
Block a user