Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7571816

Browse files
committed
Moving to c++14
1 parent ac383f4 commit 7571816

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CONFIG_PATH}")
77

88
#---- Enable C++11 ----
99
if(NOT CMAKE_VERSION VERSION_LESS 3.1)
10-
set(CMAKE_CXX_STANDARD 11)
10+
set(CMAKE_CXX_STANDARD 14)
1111
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1212
else()
13-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
13+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
1414
endif()
1515

1616
if(MSVC)

include/behaviortree_cpp_v3/control_node.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ class ControlNode : public TreeNode
4343

4444
virtual void halt() override;
4545

46-
4746
void haltChildren();
4847

48+
[[deprecated( "deprecated: please use explicitly haltChildren() or haltChild(i)")]]
49+
void haltChildren(size_t first);
50+
4951
void haltChild(size_t i);
5052

5153
virtual NodeType type() const override final

src/control_node.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,12 @@ void ControlNode::haltChildren()
5959
}
6060
}
6161

62+
void ControlNode::haltChildren(size_t first)
63+
{
64+
for (size_t i = first; i < children_nodes_.size(); i++)
65+
{
66+
haltChild(i);
67+
}
68+
}
69+
6270
} // end namespace

0 commit comments

Comments
 (0)