Author: mordante
Date: Wed Aug 27 00:21:04 2008
New Revision: 29009
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29009&view=rev
Log:
Change the text storage type to std::string.
I thought the t_string had some magic to automatically change it's text
when the translation changes. That's not the case so no longer need it
to be a t_string. Also future changes to the text widgets will get
problems since I want to return references which might be temporaries
due to the conversions in t_string so rather avoid that as well.
Modified:
trunk/src/text.cpp
trunk/src/text.hpp
Modified: trunk/src/text.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/text.cpp?rev=29009&r1=29008&r2=29009&view=diff
==============================================================================
--- trunk/src/text.cpp (original)
+++ trunk/src/text.cpp Wed Aug 27 00:21:04 2008
@@ -204,7 +204,7 @@
return utils::string_to_wstring(text_).size();
}
-ttext& ttext::set_text(const t_string& text, const bool markedup)
+ttext& ttext::set_text(const std::string& text, const bool markedup)
{
if(markedup != markedup_text_ || text != text_) {
if(markedup) {
Modified: trunk/src/text.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/text.hpp?rev=29009&r1=29008&r2=29009&view=diff
==============================================================================
--- trunk/src/text.hpp (original)
+++ trunk/src/text.hpp Wed Aug 27 00:21:04 2008
@@ -16,10 +16,11 @@
#define TEXT_HPP_INCLUDED
#include "sdl_utils.hpp"
-#include "tstring.hpp"
#include <pango/pango.h>
#include <pango/pangocairo.h>
+
+#include <string>
class language_def;
@@ -113,7 +114,7 @@
/***** ***** ***** ***** Setters ***** ***** ***** *****/
- ttext& set_text(const t_string& text, const bool markedup);
+ ttext& set_text(const std::string& text, const bool markedup);
ttext& set_font_size(const unsigned font_size);
@@ -138,7 +139,7 @@
mutable surface surface_;
/** The text to draw (stored as utf-8). */
- t_string text_;
+ std::string text_;
/** Is the text markedup if so the markedup render routines need to be
used. */
bool markedup_text_;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits