Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cmake build and avoid warning #1586

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmake/Packages/FindLuaBuild/LuaVanilla.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ extern \"C\" {
file(TO_NATIVE_PATH "${LUA_VANILLA_SOURCE_LUA_HPP}" LUA_VANILLA_SOURCE_LUA_HPP)
endif()

set(LUA_VANILLA_INCLUDE_DIRS ${lua-vanilla_SOURCE_DIR}/include)
set(LUA_VANILLA_INCLUDE_DIRS ${lua-vanilla_SOURCE_DIR}/src)
endif()

# # Target names
Expand Down Expand Up @@ -251,7 +251,9 @@ else()
endif()
target_compile_options(${liblua}
PRIVATE ${LUA_VANILLA_LUALIB_COMPILER_OPTIONS})
if(LUA_LOCAL_DIR)
add_dependencies(${liblua} LUA_VANILLA)
endif()
target_link_libraries(${liblua} PRIVATE ${CMAKE_DL_LIBS})
if (UNIX)
target_link_libraries(${liblua} PRIVATE m)
Expand Down
2 changes: 1 addition & 1 deletion tests/coroutines/source/array_proxy_lifetime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ inline namespace sol2_regression_test_coroutines_array_proxy_lifetime {

value_type operator*() const {
size_t size = a.mpParent.children.size();
if (index >= 0 && index < size) {
if (index < size) {
return a.mpParent.children[index];
}
return std::weak_ptr<A>();
Expand Down