diff options
author | sfan5 <sfan5@live.de> | 2021-07-12 11:53:05 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-07-12 12:03:39 +0200 |
commit | 5c89a0e12a1e679180b14bf92bdcdb1614e3982e (patch) | |
tree | c47a4c5c638c836ac3cafb77934afb95d9c4aa83 /src/client | |
parent | effb5356caee01c8bfa63e98974347aab01f96ef (diff) | |
download | minetest-5c89a0e12a1e679180b14bf92bdcdb1614e3982e.tar.gz minetest-5c89a0e12a1e679180b14bf92bdcdb1614e3982e.tar.bz2 minetest-5c89a0e12a1e679180b14bf92bdcdb1614e3982e.zip |
Fix build on Ubuntu 16.04 and macOS
Apparently the C++ standard library is supposed to provide
specializations of std::hash for enums (even in C++11)
but those don't always work for whatever reason.
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/renderingengine.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index 037ede074..ead4c7e21 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -557,13 +557,13 @@ void RenderingEngine::draw_scene(video::SColor skycolor, bool show_hud, const VideoDriverInfo &RenderingEngine::getVideoDriverInfo(irr::video::E_DRIVER_TYPE type) { - static const std::unordered_map<irr::video::E_DRIVER_TYPE,VideoDriverInfo> driver_info_map = { - {irr::video::EDT_NULL, {"null", "NULL Driver"}}, - {irr::video::EDT_OPENGL, {"opengl", "OpenGL"}}, - {irr::video::EDT_OGLES1, {"ogles1", "OpenGL ES1"}}, - {irr::video::EDT_OGLES2, {"ogles2", "OpenGL ES2"}}, + static const std::unordered_map<int, VideoDriverInfo> driver_info_map = { + {(int)video::EDT_NULL, {"null", "NULL Driver"}}, + {(int)video::EDT_OPENGL, {"opengl", "OpenGL"}}, + {(int)video::EDT_OGLES1, {"ogles1", "OpenGL ES1"}}, + {(int)video::EDT_OGLES2, {"ogles2", "OpenGL ES2"}}, }; - return driver_info_map.at(type); + return driver_info_map.at((int)type); } #ifndef __ANDROID__ |