MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / to_string

Function to_string

ogsr_engine/xrGame/script_engine_help.cpp:54–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54static luabind::internal_string to_string(luabind::object const& o)
55{
56 using namespace luabind;
57 if (o.type() == LUA_TSTRING)
58 return object_cast<luabind::internal_string>(o);
59 lua_State* L = o.lua_state();
60 LUABIND_CHECK_STACK(L);
61
62 std::stringstream s;
63
64 if (o.type() == LUA_TNUMBER)
65 {
66 s << object_cast<float>(o);
67 return luabind::internal_string(s.str().c_str());
68 }
69
70 s << "<" << lua_typename(L, o.type()) << ">";
71 return s.str().c_str();
72}
73
74void strreplaceall(luabind::internal_string& str, LPCSTR S, LPCSTR N)
75{

Callers 15

GetBriefInfoMethod · 0.85
player_hudMethod · 0.85
PlayAnimShootMethod · 0.85
PlayAnimFakeShootMethod · 0.85
PlayAnimSprintStartMethod · 0.85
PlayAnimSprintEndMethod · 0.85
PlayAnimIdleMethod · 0.85
PlayAnimCheckMisfireMethod · 0.85
PlayAnimDeviceSwitchMethod · 0.85
member_to_stringFunction · 0.85
print_classFunction · 0.85

Calls 4

typeMethod · 0.80
lua_stateMethod · 0.80
lua_typenameFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected