aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2012-03-29 01:53:09 +0200
committerJohannes Schickel2012-03-29 01:53:09 +0200
commit02e77dd7b25c47b10eef57bb59385e43d22b8b87 (patch)
tree85416f7da1bd23f377606b90120a482ba1b66f4b
parentf3a19ea6aa39c66653fb0b012506c5aa7e091c71 (diff)
downloadscummvm-rg350-02e77dd7b25c47b10eef57bb59385e43d22b8b87.tar.gz
scummvm-rg350-02e77dd7b25c47b10eef57bb59385e43d22b8b87.tar.bz2
scummvm-rg350-02e77dd7b25c47b10eef57bb59385e43d22b8b87.zip
GUI: Don't typedef Common::String in PredictiveDialog code.
-rw-r--r--gui/predictivedialog.cpp6
-rw-r--r--gui/predictivedialog.h20
2 files changed, 12 insertions, 14 deletions
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index aa2a358fa3..fd86fb4ac9 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -630,7 +630,7 @@ void PredictiveDialog::bringWordtoTop(char *str, int wordnum) {
memcpy(str, tmp.c_str(), strlen(str));
}
-int PredictiveDialog::binarySearch(char **dictLine, const String &code, int dictLineCount) {
+int PredictiveDialog::binarySearch(char **dictLine, const Common::String &code, int dictLineCount) {
int hi = dictLineCount - 1;
int lo = 0;
int line = 0;
@@ -691,7 +691,7 @@ bool PredictiveDialog::matchWord() {
}
}
-bool PredictiveDialog::searchWord(char *where, const String &whatCode) {
+bool PredictiveDialog::searchWord(char *where, const Common::String &whatCode) {
char *ptr = where;
ptr += whatCode.size();
@@ -712,7 +712,7 @@ bool PredictiveDialog::searchWord(char *where, const String &whatCode) {
return is;
}
-void PredictiveDialog::addWord(Dict &dict, const String &word, const String &code) {
+void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Common::String &code) {
char *newLine;
Common::String tmpCode = code + ' ';
int line = binarySearch(dict.dictLine, tmpCode, dict.dictLineCount);
diff --git a/gui/predictivedialog.h b/gui/predictivedialog.h
index 0b36d42a11..792e744ab6 100644
--- a/gui/predictivedialog.h
+++ b/gui/predictivedialog.h
@@ -63,8 +63,6 @@ enum {
};
class PredictiveDialog : public GUI::Dialog {
- typedef Common::String String;
-
public:
PredictiveDialog();
~PredictiveDialog();
@@ -81,8 +79,8 @@ private:
char *dictActLine; // using only for united dict...
int32 dictLineCount;
int32 dictTextSize;
- String nameDict;
- String fnameDict;
+ Common::String nameDict;
+ Common::String fnameDict;
};
uint8 countWordsInString(char *str);
@@ -90,9 +88,9 @@ private:
void loadDictionary(Common::SeekableReadStream *in, Dict &dict);
void loadAllDictionary(Dict &dict);
void addWordToDict();
- void addWord(Dict &dict, const String &word, const String &code);
- bool searchWord(char *where, const String &whatCode);
- int binarySearch(char **dictLine, const String &code, int dictLineCount);
+ void addWord(Dict &dict, const Common::String &word, const Common::String &code);
+ bool searchWord(char *where, const Common::String &whatCode);
+ int binarySearch(char **dictLine, const Common::String &code, int dictLineCount);
bool matchWord();
void processBtnActive(ButtonId active);
void pressEditText();
@@ -114,9 +112,9 @@ private:
uint8 _numMatchingWords;
char _predictiveResult[40];
- String _currentCode;
- String _currentWord;
- String _prefix;
+ Common::String _currentCode;
+ Common::String _currentWord;
+ Common::String _prefix;
uint32 _curTime, _lastTime;
ButtonId _lastPressBtn;
@@ -127,7 +125,7 @@ private:
char *_memoryList[kMaxWord];
int _numMemory;
- String _search;
+ Common::String _search;
bool _navigationwithkeys;
private: