Adds helper function for printing constString.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f8c3e92769
commit
514de9a2ba
|
@ -81,6 +81,9 @@ void AngelScriptResolver::Initialize(CreatureLib::Battling::BattleLibrary* arg,
|
|||
r = _engine->RegisterGlobalFunction("void print(const string &in)", asFUNCTION(Print), asCALL_CDECL);
|
||||
if (r < 0)
|
||||
throw ArbUt::Exception("Registering print function failed.");
|
||||
r = _engine->RegisterGlobalFunction("void print(const constString &in)", asFUNCTION(PrintConst), asCALL_CDECL);
|
||||
if (r < 0)
|
||||
throw ArbUt::Exception("Registering print function failed.");
|
||||
}
|
||||
|
||||
_builder.StartNewModule(_engine, "pkmn");
|
||||
|
|
|
@ -21,6 +21,7 @@ private:
|
|||
|
||||
static void MessageCallback(const asSMessageInfo* msg, void* param);
|
||||
static void Print(const std::string& str) { std::cout << str << std::endl; }
|
||||
static void PrintConst(const ArbUt::StringView& str) { Print(std::string(str.std_str())); }
|
||||
ArbUt::Dictionary<ScriptCategory, ArbUt::Dictionary<ArbUt::StringView, AngelScriptTypeInfo*>> _typeDatabase;
|
||||
ArbUt::Dictionary<ArbUt::StringView, asITypeInfo*> _baseTypes;
|
||||
ArbUt::Dictionary<ArbUt::StringView, asITypeInfo*> _itemUseTypes;
|
||||
|
|
Loading…
Reference in New Issue