MCPcopy Create free account
hub / github.com/covscript/covscript / remove_protect

Function remove_protect

tests/reflection.cpp:15–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13};
14
15int remove_protect(cs::var &val) {
16 reflect_proxy *proxy = reinterpret_cast<reflect_any *>(&val)->proxy;
17 int level = proxy->protect_level;
18 proxy->protect_level = 0;
19 return level;
20}
21
22void set_protect(cs::var &val, int level) {
23 reinterpret_cast<reflect_any *>(&val)->proxy->protect_level = level;

Callers 2

modify_functionFunction · 0.85
reflection.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected