aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Base/scriptables/SXString.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/Base/scriptables/SXString.cpp')
-rw-r--r--engines/wintermute/Base/scriptables/SXString.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/engines/wintermute/Base/scriptables/SXString.cpp b/engines/wintermute/Base/scriptables/SXString.cpp
index 7c0f11813a..65bf933d0a 100644
--- a/engines/wintermute/Base/scriptables/SXString.cpp
+++ b/engines/wintermute/Base/scriptables/SXString.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -271,7 +271,7 @@ HRESULT CSXString::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th
Common::Array<WideString> parts;
-
+
Common::StringTokenizer tokenizer(str, delims);
while (!tokenizer.empty()) {
Common::String str2 = tokenizer.nextToken();
@@ -279,19 +279,19 @@ HRESULT CSXString::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th
}
// TODO: Clean this up
/*do {
- pos = StringUtil::IndexOf(Common::String(str.c_str() + start), delims, start);
- //pos = str.find_first_of(delims, start);
- if (pos == start) {
- start = pos + 1;
- } else if (pos == str.size()) {
- parts.push_back(Common::String(str.c_str() + start));
- break;
- } else {
- parts.push_back(Common::String(str.c_str() + start, pos - start));
- start = pos + 1;
- }
- //start = str.find_first_not_of(delims, start);
- start = StringUtil::LastIndexOf(Common::String(str.c_str() + start), delims, start) + 1;
+ pos = StringUtil::IndexOf(Common::String(str.c_str() + start), delims, start);
+ //pos = str.find_first_of(delims, start);
+ if (pos == start) {
+ start = pos + 1;
+ } else if (pos == str.size()) {
+ parts.push_back(Common::String(str.c_str() + start));
+ break;
+ } else {
+ parts.push_back(Common::String(str.c_str() + start, pos - start));
+ start = pos + 1;
+ }
+ //start = str.find_first_not_of(delims, start);
+ start = StringUtil::LastIndexOf(Common::String(str.c_str() + start), delims, start) + 1;
} while (pos != str.size());*/