| 84 | } |
| 85 | |
| 86 | void LuaStorage::Section::set(std::string_view key, const sol::object& value) |
| 87 | { |
| 88 | checkIfActive(); |
| 89 | throwIfCallbackRecursionIsTooDeep(); |
| 90 | if (value != sol::nil) |
| 91 | mValues[std::string(key)] = Value(value); |
| 92 | else |
| 93 | { |
| 94 | auto it = mValues.find(key); |
| 95 | if (it != mValues.end()) |
| 96 | mValues.erase(it); |
| 97 | } |
| 98 | if (mStorage->mListener) |
| 99 | mStorage->mListener->valueChanged(mSectionName, key, value); |
| 100 | runCallbacks(key); |
| 101 | } |
| 102 | |
| 103 | void LuaStorage::Section::setAll(const sol::optional<sol::table>& values) |
| 104 | { |
no test coverage detected