Skip to content

Commit

Permalink
Fix a static analysis warning
Browse files Browse the repository at this point in the history
reply.h: std::move was used where std::forward should be used

Fixes sewenew#589

Signed-off-by: Ted Lyngmo <[email protected]>
  • Loading branch information
TedLyngmo committed Sep 12, 2024
1 parent 202b36b commit 1317ed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sw/redis++/reply.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ template <typename T, typename ...Args>
auto parse_variant(redisReply &reply) ->
typename std::enable_if<sizeof...(Args) != 0, Variant<T, Args...>>::type {
auto return_var = [](auto &&arg) {
return Variant<T, Args...>(std::move(arg));
return Variant<T, Args...>(std::forward<decltype(arg)>(arg));
};

try {
Expand Down

0 comments on commit 1317ed9

Please sign in to comment.