Fix a noexcept issue
parent
ab09cde351
commit
5063288b30
|
@ -122,7 +122,7 @@ void LuaGuiElement::remove(sol::this_state s, sol::object elem) {
|
|||
}
|
||||
}
|
||||
|
||||
Any LuaGuiElement::getAsAny(const std::string &key) const noexcept {
|
||||
Any LuaGuiElement::getAsAny(const std::string &key) const {
|
||||
if (!traits.count(key)) return Any();
|
||||
auto object = traits.at(key);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
std::unordered_map<std::string, sol::object> traits {};
|
||||
|
||||
// C++ Functions and Properties
|
||||
Any getAsAny(const std::string& key) const noexcept;
|
||||
Any getAsAny(const std::string& key) const;
|
||||
template <typename T> const T& get(const std::string& key) const {
|
||||
Any a = getAsAny(key);
|
||||
return a.get<T>();
|
||||
|
|
Loading…
Reference in New Issue