我现在正在尝试使用 GCC 编译此项目。编译过程中出现了如下错误(示例):
RaycastEngine/module_imgui.cpp:862:184: error: operands to ‘?:’ have different types ‘luabridge::LuaRef’
问题出在 module_imgui.cpp 文件中,有多个从 luabridge::LuaRef 在三元运算符中被隐式转换为 int,导致编译错误。例如:
|
.addFunction("ColorPicker4", +[](const char* label, ImColor& color, luabridge::LuaRef flags) { return ImGui::ColorPicker4(label, &color.Value.x, flags ? flags : 0); }) |
应当被修改为:(在 flag 处添加 static_cast<int>)
.addFunction("ColorPicker4", +[](const char* label, ImColor& color, luabridge::LuaRef flags) { return ImGui::ColorPicker4(label, &color.Value.x, flags ? static_cast<int>(flags) : 0); })
我现在正在尝试使用 GCC 编译此项目。编译过程中出现了如下错误(示例):
问题出在
module_imgui.cpp文件中,有多个从luabridge::LuaRef在三元运算符中被隐式转换为int,导致编译错误。例如:VoidNovelEngine/RaycastEngine/module_imgui.cpp
Line 862 in 94554bc
应当被修改为:(在 flag 处添加
static_cast<int>)