Skip to content

Commit e09f536

Browse files
committed
Take const T& params to align with how they're returned later
1 parent 90b26af commit e09f536

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Code/max/Containers/StateMachine/Node.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace StateMachine {
2525
{}
2626

2727
template<typename T>
28-
constexpr std::optional<size_t> AttemptTransition(T input) noexcept {
28+
constexpr std::optional<size_t> AttemptTransition(const T& input) noexcept {
2929
auto transition_happened = false;
3030
auto new_node_index = std::optional<size_t>{std::nullopt};
3131

Code/max/Containers/StateMachine/Transition.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace StateMachine {
2222
{}
2323

2424
template<typename T>
25-
constexpr std::optional<size_t> AttemptTransition(T input) noexcept {
25+
constexpr std::optional<size_t> AttemptTransition(const T& input) noexcept {
2626
if (matcher_.DoesMatch(input)) {
2727
return callback_(std::move(input));
2828
}

0 commit comments

Comments
 (0)