mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
Fix macos compile Issue (#324)
Related [Issue 206](https://github.com/BeamMP/BeamMP-Server/issues/206)
This commit is contained in:
commit
c880460a55
@ -173,6 +173,11 @@ add_library(commandline_static
|
||||
deps/commandline/src/backends/BufferedBackend.cpp
|
||||
deps/commandline/src/backends/BufferedBackend.h
|
||||
)
|
||||
|
||||
# Ensure the commandline library uses C++11
|
||||
set_target_properties(commandline_static PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES)
|
||||
|
||||
|
||||
if (WIN32)
|
||||
target_compile_definitions(commandline_static PRIVATE -DPLATFORM_WINDOWS=1)
|
||||
else ()
|
||||
@ -216,4 +221,3 @@ if(${PROJECT_NAME}_ENABLE_UNIT_TESTING)
|
||||
target_link_options(${PROJECT_NAME}-tests PRIVATE "/SUBSYSTEM:CONSOLE")
|
||||
endif(MSVC)
|
||||
endif()
|
||||
|
||||
|
@ -268,7 +268,7 @@ std::vector<std::string> TLuaEngine::StateThreadData::GetStateTableKeys(const st
|
||||
|
||||
for (size_t i = 0; i < keys.size(); ++i) {
|
||||
auto obj = current.get<sol::object>(keys.at(i));
|
||||
if (obj.get_type() == sol::type::nil) {
|
||||
if (obj.get_type() == sol::type::lua_nil) {
|
||||
// error
|
||||
break;
|
||||
} else if (i == keys.size() - 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user