From 33ab50556760a84d6754235e553c68ada2f35a63 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 6 Sep 2014 17:46:56 +0000 Subject: (svn r26774) -Cleanup [Squirrel]: remove _SC macro --- src/script/api/script_admin.cpp | 4 ++-- src/script/api/script_controller.cpp | 2 +- src/script/api/script_list.cpp | 10 +++++----- src/script/api/script_text.cpp | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/script/api') diff --git a/src/script/api/script_admin.cpp b/src/script/api/script_admin.cpp index f6c41387b..f66d9fc8a 100644 --- a/src/script/api/script_admin.cpp +++ b/src/script/api/script_admin.cpp @@ -126,10 +126,10 @@ /* static */ SQInteger ScriptAdmin::Send(HSQUIRRELVM vm) { - if (sq_gettop(vm) - 1 != 1) return sq_throwerror(vm, _SC("wrong number of parameters")); + if (sq_gettop(vm) - 1 != 1) return sq_throwerror(vm, "wrong number of parameters"); if (sq_gettype(vm, 2) != OT_TABLE) { - return sq_throwerror(vm, _SC("ScriptAdmin::Send requires a table as first parameter. No data sent.")); + return sq_throwerror(vm, "ScriptAdmin::Send requires a table as first parameter. No data sent."); } std::string json; diff --git a/src/script/api/script_controller.cpp b/src/script/api/script_controller.cpp index aca645c05..a42c8ede9 100644 --- a/src/script/api/script_controller.cpp +++ b/src/script/api/script_controller.cpp @@ -161,7 +161,7 @@ ScriptController::~ScriptController() sq_pushroottable(vm); sq_pushstring(vm, fake_class, -1); if (SQ_FAILED(sq_get(vm, -2))) { - throw sq_throwerror(vm, _SC("internal error assigning library class")); + throw sq_throwerror(vm, "internal error assigning library class"); } sq_pushstring(vm, lib->GetInstanceName(), -1); if (SQ_FAILED(sq_get(vm, -2))) { diff --git a/src/script/api/script_list.cpp b/src/script/api/script_list.cpp index a185e0d89..cd605a509 100644 --- a/src/script/api/script_list.cpp +++ b/src/script/api/script_list.cpp @@ -758,7 +758,7 @@ SQInteger ScriptList::_set(HSQUIRRELVM vm) { if (sq_gettype(vm, 2) != OT_INTEGER) return SQ_ERROR; if (sq_gettype(vm, 3) != OT_INTEGER && sq_gettype(vm, 3) != OT_NULL) { - return sq_throwerror(vm, _SC("you can only assign integers to this list")); + return sq_throwerror(vm, "you can only assign integers to this list"); } SQInteger idx, val; @@ -810,7 +810,7 @@ SQInteger ScriptList::Valuate(HSQUIRRELVM vm) int nparam = sq_gettop(vm) - 1; if (nparam < 1) { - return sq_throwerror(vm, _SC("You need to give a least a Valuator as parameter to ScriptList::Valuate")); + return sq_throwerror(vm, "You need to give a least a Valuator as parameter to ScriptList::Valuate"); } /* Make sure the valuator function is really a function, and not any @@ -818,7 +818,7 @@ SQInteger ScriptList::Valuate(HSQUIRRELVM vm) * first parameter they give. */ SQObjectType valuator_type = sq_gettype(vm, 2); if (valuator_type != OT_CLOSURE && valuator_type != OT_NATIVECLOSURE) { - return sq_throwerror(vm, _SC("parameter 1 has an invalid type (expected function)")); + return sq_throwerror(vm, "parameter 1 has an invalid type (expected function)"); } /* Don't allow docommand from a Valuator, as we can't resume in @@ -867,7 +867,7 @@ SQInteger ScriptList::Valuate(HSQUIRRELVM vm) sq_pop(vm, nparam + 4); ScriptObject::SetAllowDoCommand(backup_allow); - return sq_throwerror(vm, _SC("return value of valuator is not valid (not integer/bool)")); + return sq_throwerror(vm, "return value of valuator is not valid (not integer/bool)"); } } @@ -877,7 +877,7 @@ SQInteger ScriptList::Valuate(HSQUIRRELVM vm) sq_pop(vm, nparam + 4); ScriptObject::SetAllowDoCommand(backup_allow); - return sq_throwerror(vm, _SC("modifying valuated list outside of valuator function")); + return sq_throwerror(vm, "modifying valuated list outside of valuator function"); } this->SetValue((*iter).first, value); diff --git a/src/script/api/script_text.cpp b/src/script/api/script_text.cpp index 0c2c0516b..51fc19863 100644 --- a/src/script/api/script_text.cpp +++ b/src/script/api/script_text.cpp @@ -34,13 +34,13 @@ ScriptText::ScriptText(HSQUIRRELVM vm) : { int nparam = sq_gettop(vm) - 1; if (nparam < 1) { - throw sq_throwerror(vm, _SC("You need to pass at least a StringID to the constructor")); + throw sq_throwerror(vm, "You need to pass at least a StringID to the constructor"); } /* First resolve the StringID. */ SQInteger sqstring; if (SQ_FAILED(sq_getinteger(vm, 2, &sqstring))) { - throw sq_throwerror(vm, _SC("First argument must be a valid StringID")); + throw sq_throwerror(vm, "First argument must be a valid StringID"); } this->string = sqstring; @@ -51,7 +51,7 @@ ScriptText::ScriptText(HSQUIRRELVM vm) : if (SQ_FAILED(this->_SetParam(i, vm))) { this->~ScriptText(); - throw sq_throwerror(vm, _SC("Invalid parameter")); + throw sq_throwerror(vm, "Invalid parameter"); } /* Pop the parameter again. */ @@ -104,7 +104,7 @@ SQInteger ScriptText::_SetParam(int parameter, HSQUIRRELVM vm) /* Validate if it is a GSText instance */ sq_pushroottable(vm); - sq_pushstring(vm, _SC("GSText"), -1); + sq_pushstring(vm, "GSText", -1); sq_get(vm, -2); sq_pushobject(vm, instance); if (sq_instanceof(vm) != SQTrue) return SQ_ERROR; -- cgit v1.2.3-70-g09d2