MCPcopy Create free account
hub / github.com/anjo76/angelscript / GetStringConstant

Method GetStringConstant

sdk/samples/asbuild/source/main.cpp:118–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 }
117
118 const void *GetStringConstant(const char *data, asUINT length)
119 {
120 string str(data, length);
121 map_t::iterator it = stringCache.find(str);
122 if (it != stringCache.end())
123 it->second++;
124 else
125 it = stringCache.insert(map_t::value_type(str, 1)).first;
126
127 return reinterpret_cast<const void*>(&it->first);
128 }
129
130 int ReleaseStringConstant(const void *str)
131 {

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected