MCPcopy Create free account
hub / github.com/OpenMW/openmw / setAll

Method setAll

components/lua/storage.cpp:103–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101 }
102
103 void LuaStorage::Section::setAll(const sol::optional<sol::table>& values)
104 {
105 checkIfActive();
106 throwIfCallbackRecursionIsTooDeep();
107 mValues.clear();
108 if (values)
109 {
110 for (const auto& [k, v] : *values)
111 mValues[cast<std::string>(k)] = Value(v);
112 }
113 if (mStorage->mListener)
114 mStorage->mListener->sectionReplaced(mSectionName, values);
115 runCallbacks(sol::nullopt);
116 }
117
118 sol::table LuaStorage::Section::asTable(lua_State* state)
119 {

Callers 2

initLuaBindingsMethod · 0.80
setSectionValuesMethod · 0.80

Calls 2

ValueClass · 0.70
clearMethod · 0.45

Tested by

no test coverage detected