From c9e889723b7af832322d178975e6e440d6cd3ae5 Mon Sep 17 00:00:00 2001 From: LDA Date: Mon, 26 Jun 2023 11:48:27 -0700 Subject: resolved most of the compiler warnings/errors under gcc also update xxhash and tinyformat --- source/game/StarBehaviorState.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/game/StarBehaviorState.cpp') diff --git a/source/game/StarBehaviorState.cpp b/source/game/StarBehaviorState.cpp index b27a076..5308f3a 100644 --- a/source/game/StarBehaviorState.cpp +++ b/source/game/StarBehaviorState.cpp @@ -209,7 +209,7 @@ NodeStatus BehaviorState::runAction(ActionNode const& node, NodeState& state) { LuaThread thread = nodeLuaThread(node.name); try { result = thread.resume(parameters, blackboardPtr(), id, m_lastDt).value(ActionReturn(NodeStatus::Invalid, LuaNil)); - } catch (LuaException e) { + } catch (LuaException const& e) { throw StarException(strf("Lua Exception caught running action node %s in behavior %s: %s", node.name, m_tree->name, outputException(e, false))); } @@ -221,7 +221,7 @@ NodeStatus BehaviorState::runAction(ActionNode const& node, NodeState& state) { try { result = thread.resume(m_lastDt).value(ActionReturn(NodeStatus::Invalid, LuaNil)); - } catch (LuaException e) { + } catch (LuaException const& e) { throw StarException(strf("Lua Exception caught resuming action node %s in behavior %s: %s", node.name, m_tree->name, outputException(e, false))); } @@ -245,7 +245,7 @@ NodeStatus BehaviorState::runDecorator(DecoratorNode const& node, NodeState& sta LuaThread thread = nodeLuaThread(node.name); try { status = thread.resume(parameters, blackboardPtr(), id).value(NodeStatus::Invalid); - } catch (LuaException e) { + } catch (LuaException const& e) { throw StarException(strf("Lua Exception caught initializing decorator node %s in behavior %s: %s", node.name, m_tree->name, outputException(e, false))); } if (status == NodeStatus::Success || status == NodeStatus::Failure) @@ -261,7 +261,7 @@ NodeStatus BehaviorState::runDecorator(DecoratorNode const& node, NodeState& sta if (childStatus == NodeStatus::Success || childStatus == NodeStatus::Failure) { try { status = decorator.thread.resume(childStatus).value(NodeStatus::Invalid); - } catch (LuaException e) { + } catch (LuaException const& e) { throw StarException(strf("Lua Exception caught resuming decorator node %s in behavior %s: %s", node.name, m_tree->name, outputException(e, false))); } } else { -- cgit v1.2.3