diff options
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/predictive.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/engines/agi/predictive.cpp b/engines/agi/predictive.cpp index e65e1bf2b4..731384b5c7 100644 --- a/engines/agi/predictive.cpp +++ b/engines/agi/predictive.cpp @@ -315,19 +315,6 @@ bool AgiEngine::predictiveDialog(void) { return rc; } -static char *ltrim(char *t) { - while (isspace(*t)) - t++; - return t; -} - -static char *rtrim(char *t) { - int l = strlen(t) - 1; - while (l >= 0 && isspace(t[l])) - t[l--] = 0; - return t; -} - #define MAXLINELEN 80 void AgiEngine::loadDict(void) { @@ -343,7 +330,7 @@ void AgiEngine::loadDict(void) { while (!in.eos() && in.readLine(buf, MAXLINELEN)) { // Skip leading & trailing whitespaces - char *word = rtrim(ltrim(buf)); + char *word = Common::trim(buf); // Skip empty lines if (*word == 0) |