15 lines
732 B
C++
15 lines
732 B
C++
|
#include "ConstString.hpp"
|
||
|
using ConstString = Arbutils::CaseInsensitiveConstString;
|
||
|
|
||
|
static bool ConstStringEquality(const ConstString& a, const ConstString& b) { return a == b; }
|
||
|
|
||
|
void ConstStringRegister::Register(asIScriptEngine* engine) {
|
||
|
auto r = engine->RegisterObjectType("constString", sizeof(Arbutils::CaseInsensitiveConstString),
|
||
|
asOBJ_VALUE | asOBJ_POD);
|
||
|
Assert(r >= 0);
|
||
|
r = engine->RegisterObjectMethod("constString", "bool opEquals(const constString &in) const",
|
||
|
asFUNCTIONPR(ConstStringEquality, (const ConstString&, const ConstString&), bool),
|
||
|
asCALL_CDECL_OBJFIRST);
|
||
|
Assert(r >= 0);
|
||
|
}
|