slightly less tagged string checking

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1304 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2009-01-08 17:25:36 +00:00
parent eed4c5301e
commit 05ba96ab3e
3 changed files with 17 additions and 15 deletions
+4 -4
View File
@@ -324,7 +324,7 @@ SCRIPT_FUNCTION(sort_text) {
/// Replace the contents of a specific tag with the value of a script function
String replace_tag_contents(String input, const String& tag, const ScriptValueP& contents, Context& ctx) {
assert_tagged(input);
assert_tagged(input, false);
String ret;
size_t start = 0, pos = input.find(tag);
while (pos != String::npos) {
@@ -345,7 +345,7 @@ String replace_tag_contents(String input, const String& tag, const ScriptValueP&
pos = input.find(tag, start);
}
ret.append(input, start, pos-start);
assert_tagged(ret);
assert_tagged(ret, false);
return ret;
}
@@ -360,13 +360,13 @@ SCRIPT_FUNCTION(tag_contents) {
SCRIPT_FUNCTION(remove_tag) {
SCRIPT_PARAM_C(String, input);
SCRIPT_PARAM_C(String, tag);
assert_tagged(input);
assert_tagged(input, false);
SCRIPT_RETURN(remove_tag(input, tag));
}
SCRIPT_FUNCTION(remove_tags) {
SCRIPT_PARAM_C(String, input);
assert_tagged(input);
assert_tagged(input, false);
SCRIPT_RETURN(untag_no_escape(input));
}