Skip to content

Commit

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

Fixes #589

Signed-off-by: Ted Lyngmo <ted@lyncon.se>
  • Loading branch information
TedLyngmo authored Sep 13, 2024
1 parent 202b36b commit 3cca0f1
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 3cca0f1

Please sign in to comment.