Skip to content

Commit 16c5ff9

Browse files
committed
fix(flow): 修复unused-parameter编译警告
1 parent f54f8b0 commit 16c5ff9

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

modules/flow/actions/function_action_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ TEST(FunctionAction, WithVars) {
137137
bool is_callback = false;
138138
seq.setFinishCallback(
139139
[&] (bool is_succ, const Action::Reason &r, const Action::Trace &) {
140+
EXPECT_TRUE(is_succ);
140141
is_callback = true;
141142
EXPECT_EQ(r.code, 1001);
142143
EXPECT_EQ(r.message, "test");

modules/flow/actions/switch_action.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void SwitchAction::onReset() {
167167
AssembleAction::onReset();
168168
}
169169

170-
void SwitchAction::onSwitchActionFinished(bool is_succ, const Reason &why, const Trace &trace) {
170+
void SwitchAction::onSwitchActionFinished(bool is_succ, const Reason &why, const Trace &) {
171171
if (state() == State::kRunning) {
172172
if (is_succ) {
173173
running_action_ = default_action_;

modules/flow/actions/switch_action_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ TEST(SwitchAction, StopOnSwitch) {
321321
});
322322

323323
action.setFinishCallback(
324-
[&] (bool is_succ, const Action::Reason &, const Action::Trace &) {
324+
[&] (bool, const Action::Reason &, const Action::Trace &) {
325325
all_done = true;
326326
}
327327
);
@@ -369,7 +369,7 @@ TEST(SwitchAction, StopOnDefault) {
369369
});
370370

371371
action.setFinishCallback(
372-
[&] (bool is_succ, const Action::Reason &, const Action::Trace &) {
372+
[&] (bool, const Action::Reason &, const Action::Trace &) {
373373
all_done = true;
374374
}
375375
);

0 commit comments

Comments
 (0)