File tree Expand file tree Collapse file tree 4 files changed +18
-7
lines changed
include/behaviortree_cpp/utils Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 3
3
build *
4
4
site /*
5
5
/.vscode /
6
+ .vs /
6
7
7
8
# clangd cache
8
9
/.cache /*
10
+ CMakeSettings.json
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ if(USE_V3_COMPATIBLE_NAMES)
60
60
endif ()
61
61
62
62
#---- Find other packages ----
63
- find_package (Threads )
63
+ find_package (Threads REQUIRED )
64
64
find_package (ZMQ )
65
65
66
66
if ( ZMQ_FOUND )
@@ -112,10 +112,12 @@ elseif(BTCPP_UNIT_TESTS)
112
112
include (FetchContent )
113
113
FetchContent_Declare (
114
114
googletest
115
- URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
116
- )
115
+ GIT_REPOSITORY https://github.com/google/googletest.git
116
+ GIT_TAG release-1.12.1 )
117
117
# For Windows: Prevent overriding the parent project's compiler/linker settings
118
118
set (gtest_force_shared_crt ON CACHE BOOL "" FORCE )
119
+ set (BUILD_GMOCK OFF CACHE BOOL "" FORCE )
120
+ set (BUILD_GTEST ON CACHE BOOL "" FORCE )
119
121
FetchContent_MakeAvailable (googletest )
120
122
endif ()
121
123
endif ()
@@ -195,7 +197,7 @@ endif()
195
197
196
198
target_link_libraries (${BEHAVIOR_TREE_LIBRARY}
197
199
PUBLIC
198
- ${CMAKE_THREAD_LIBS_INIT}
200
+ Threads::Threads
199
201
${CMAKE_DL_LIBS}
200
202
PRIVATE
201
203
$< BUILD_INTERFACE:foonathan::lexy>
Original file line number Diff line number Diff line change @@ -73,9 +73,16 @@ inline void checkUpperLimit(const From& from)
73
73
template <typename From, typename To>
74
74
inline void checkLowerLimit (const From& from)
75
75
{
76
- if (from < std::numeric_limits<To>::min ()){
77
- throw std::runtime_error (" Value outside the lovest numerical limit." );
76
+ if constexpr (std::is_same<To, bool >::value)
77
+ {
78
+ if (from !=0 && from != 1 )
79
+ {
80
+ throw std::runtime_error (" Implicit casting to bool is not allowed" );
78
81
}
82
+ }
83
+ else if (from < std::numeric_limits<To>::min ()){
84
+ throw std::runtime_error (" Value outside the lovest numerical limit." );
85
+ }
79
86
}
80
87
81
88
template <typename From, typename To>
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ int main(int argc, char* argv[])
57
57
58
58
for (size_t i = 0 ; i < node->children_uid ()->size (); i++)
59
59
{
60
- recursiveStep (node->children_uid ()->Get (i ), indent + 1 );
60
+ recursiveStep (node->children_uid ()->Get (uint16_t (i) ), indent + 1 );
61
61
}
62
62
};
63
63
You can’t perform that action at this time.
0 commit comments