From 112709f7b6babda983feccd90c633eaca4c15e15 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 12 May 2017 14:09:25 +0200 Subject: [PATCH] Fix wrong signature, better with const ref... Was forgotten Change-Id: I2d3f7525bb85c051c43aeda6b9cc1be0f3e270c8 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/binding/low-can-cb.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CAN-binder/low-can-binding/binding/low-can-cb.cpp b/CAN-binder/low-can-binding/binding/low-can-cb.cpp index df6795f8..55d9bdd4 100644 --- a/CAN-binder/low-can-binding/binding/low-can-cb.cpp +++ b/CAN-binder/low-can-binding/binding/low-can-cb.cpp @@ -196,7 +196,7 @@ static int subscribe_unsubscribe_signals(struct afb_req request, bool subscribe, return rets; } -static int process_args(struct afb_req request, std::vector args, bool subscribe) +static int process_args(struct afb_req request, const std::vector& args, bool subscribe) { struct utils::signals_found sf; int ok = 0, total = 0; @@ -216,7 +216,7 @@ static int process_args(struct afb_req request, std::vector args, b return ok; } -static const std::vector parse_args_from_request(struct afb_req request, bool subscribe) +static const std::vector parse_args_from_request(struct afb_req request) { int i, n; std::vector ret; @@ -247,10 +247,9 @@ static const std::vector parse_args_from_request(struct afb_req req void subscribe(struct afb_req request) { - std::vector args; bool subscribe = true; - args = parse_args_from_request(request, subscribe); + const std::vector args = parse_args_from_request(request); if (process_args(request, args, subscribe) > 0) afb_req_success(request, NULL, NULL); @@ -263,7 +262,7 @@ void unsubscribe(struct afb_req request) std::vector args; bool subscribe = false; - args = parse_args_from_request(request, subscribe); + args = parse_args_from_request(request); if (process_args(request, args, subscribe) > 0) afb_req_success(request, NULL, NULL); -- 2.16.6