scylladb / cpp-driver

Scylla C/C++ Driver
25 stars 25 forks source link

Remove redundant move #81

Closed SeverinLeonhardt closed 1 year ago

SeverinLeonhardt commented 1 year ago

This was a warning (treated as error) with GCC 11:

src/connection_pool.cpp:101:49: error: redundant move in initialization [-Werror=redundant-move]

MSVC produced another warning about the same move:

C26478  Don't use std::move on constant variables.

Removed the move to make both compilers happy.

mykaul commented 1 year ago

I think you can add:

Fixes: https://github.com/scylladb/cpp-driver/issues/79

?

But apart from making the compiler happy, need to ensure everything's running well.

SeverinLeonhardt commented 1 year ago

@mykaul Sorry, totally forgot to check whether my PR addresses existing issues. I've added the Fixes: line now.

Some test applications I have also ran with this change without any issues. (Unfortunately the driver's tests don't compile for me yet, something else to look into).