Skip to content

Commit 5c89a0e

Browse files
committedJul 12, 2021
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.
1 parent effb535 commit 5c89a0e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

Diff for: ‎src/client/renderingengine.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -557,13 +557,13 @@ void RenderingEngine::draw_scene(video::SColor skycolor, bool show_hud,
557557

558558
const VideoDriverInfo &RenderingEngine::getVideoDriverInfo(irr::video::E_DRIVER_TYPE type)
559559
{
560-
static const std::unordered_map<irr::video::E_DRIVER_TYPE,VideoDriverInfo> driver_info_map = {
561-
{irr::video::EDT_NULL, {"null", "NULL Driver"}},
562-
{irr::video::EDT_OPENGL, {"opengl", "OpenGL"}},
563-
{irr::video::EDT_OGLES1, {"ogles1", "OpenGL ES1"}},
564-
{irr::video::EDT_OGLES2, {"ogles2", "OpenGL ES2"}},
560+
static const std::unordered_map<int, VideoDriverInfo> driver_info_map = {
561+
{(int)video::EDT_NULL, {"null", "NULL Driver"}},
562+
{(int)video::EDT_OPENGL, {"opengl", "OpenGL"}},
563+
{(int)video::EDT_OGLES1, {"ogles1", "OpenGL ES1"}},
564+
{(int)video::EDT_OGLES2, {"ogles2", "OpenGL ES2"}},
565565
};
566-
return driver_info_map.at(type);
566+
return driver_info_map.at((int)type);
567567
}
568568

569569
#ifndef __ANDROID__

0 commit comments

Comments
 (0)
Please sign in to comment.