| 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 | { |
no test coverage detected