Fixed ScriptValue::mapView() for const ScriptValues.
This commit is contained in:
parent
71fc1686bb
commit
4be8f387dc
@ -81,6 +81,9 @@ public:
|
||||
template<typename TMap>
|
||||
MapView(TMap& map) -> MapView<typename TMap::key_type, typename TMap::mapped_type, TMap>;
|
||||
|
||||
template<typename TMap>
|
||||
MapView(const TMap& map) -> MapView<typename TMap::key_type, const typename TMap::mapped_type, const TMap>;
|
||||
|
||||
//
|
||||
// public functions
|
||||
//
|
||||
|
@ -324,10 +324,10 @@ public:
|
||||
return std::get<map_t>(base_).values;
|
||||
}
|
||||
|
||||
MapView<std::string, const concrete_t> mapView() const MIJIN_NOEXCEPT
|
||||
auto mapView() const MIJIN_NOEXCEPT
|
||||
{
|
||||
MIJIN_ASSERT_FATAL(isMap(), "Called iterateMap() on a non-map value.");
|
||||
return std::get<map_t>(base_).values;
|
||||
return MapView(std::get<map_t>(base_).values);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user