aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/font.cpp6
-rw-r--r--graphics/font.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/graphics/font.cpp b/graphics/font.cpp
index c6053e9eb3..629f2f4b82 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -864,10 +864,10 @@ void Font::drawString(Surface *dst, const Common::String &sOld, int x, int y, in
struct WordWrapper {
- Common::StringList &lines;
+ Common::Array<Common::String> &lines;
int actualMaxLineWidth;
- WordWrapper(Common::StringList &l) : lines(l), actualMaxLineWidth(0) {
+ WordWrapper(Common::Array<Common::String> &l) : lines(l), actualMaxLineWidth(0) {
}
void add(Common::String &line, int &w) {
@@ -881,7 +881,7 @@ struct WordWrapper {
}
};
-int Font::wordWrapText(const Common::String &str, int maxWidth, Common::StringList &lines) const {
+int Font::wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const {
WordWrapper wrapper(lines);
Common::String line;
Common::String tmpStr;
diff --git a/graphics/font.h b/graphics/font.h
index e1c052c9e1..6927e0e076 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -26,6 +26,7 @@
#define GRAPHICS_FONT_H
#include "common/str.h"
+#include "common/array.h"
#include "graphics/surface.h"
namespace Common {
@@ -78,7 +79,7 @@ public:
* @param lines the string list to which the text lines from str are appended
* @return the maximal width of any of the lines added to lines
*/
- int wordWrapText(const Common::String &str, int maxWidth, Common::StringList &lines) const;
+ int wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const;
};