From 37e2dce77ff0c0a48fd51e74a19179e9044fb536 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Mon, 19 Apr 2010 13:35:30 +0800 Subject: [PATCH] Use std::string to replace String --- src/Editor.h | 1 + src/Text.h | 10 +++++----- src/Util.h | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Editor.h b/src/Editor.h index e518a54..560e9a1 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -4,6 +4,7 @@ #include #include #include "Signal.h" +#include "String.h" #include "Text.h" #include "LookupTable.h" #include "PinyinProperties.h" diff --git a/src/Text.h b/src/Text.h index 451cd63..ae98814 100644 --- a/src/Text.h +++ b/src/Text.h @@ -1,9 +1,9 @@ #ifndef __PY_TEXT_H_ #define __PY_TEXT_H_ +#include #include #include "Object.h" -#include "String.h" namespace PY { @@ -14,8 +14,8 @@ public: Text (const gchar *str) : Object (ibus_text_new_from_string (str)) {} - Text (const String & str) - : Object (ibus_text_new_from_string ((const gchar *) str)) {} + Text (const std::string & str) + : Object (ibus_text_new_from_string (str.c_str ())) {} Text (gunichar ch) : Object (ibus_text_new_from_unichar (ch)) {} @@ -35,8 +35,8 @@ public: : Text (ibus_text_new_from_static_string (str)) { } - StaticText (const String & str) - : Text (ibus_text_new_from_static_string ((const gchar *) str)) {} + StaticText (const std::string & str) + : Text (ibus_text_new_from_static_string (str.c_str ())) {} StaticText (gunichar ch) : Text (ch) {} diff --git a/src/Util.h b/src/Util.h index c9be13b..d738f2b 100644 --- a/src/Util.h +++ b/src/Util.h @@ -13,7 +13,7 @@ #include #include -#include "String.h" +#include namespace PY { @@ -59,7 +59,7 @@ public: } }; -class Env : public String { +class Env : public std::string { public: Env (const gchar *name) { gchar *str; -- 2.7.4