Move to clang-format-16 (#908)

Fixes #848
This commit is contained in:
Alex Kremer
2023-10-19 16:55:04 +01:00
committed by GitHub
parent 5de87b9ef8
commit 1aab2b94b1
265 changed files with 3950 additions and 4743 deletions

View File

@@ -37,8 +37,7 @@ namespace data::cassandra::detail {
MaybeError
Future::await() const
{
if (auto const rc = cass_future_error_code(*this); rc)
{
if (auto const rc = cass_future_error_code(*this); rc) {
auto errMsg = [this](std::string const& label) {
char const* message = nullptr;
std::size_t len = 0;
@@ -53,8 +52,7 @@ Future::await() const
ResultOrError
Future::get() const
{
if (auto const rc = cass_future_error_code(*this); rc)
{
if (auto const rc = cass_future_error_code(*this); rc) {
auto const errMsg = [this](std::string const& label) {
char const* message = nullptr;
std::size_t len = 0;
@@ -75,8 +73,7 @@ invokeHelper(CassFuture* ptr, void* cbPtr)
// stackoverflow.com/questions/77004137/boost-asio-async-compose-gets-stuck-under-load
auto* cb = static_cast<FutureWithCallback::FnType*>(cbPtr);
auto local = std::make_unique<FutureWithCallback::FnType>(std::move(*cb));
if (auto const rc = cass_future_error_code(ptr); rc)
{
if (auto const rc = cass_future_error_code(ptr); rc) {
auto const errMsg = [&ptr](std::string const& label) {
char const* message = nullptr;
std::size_t len = 0;
@@ -84,9 +81,7 @@ invokeHelper(CassFuture* ptr, void* cbPtr)
return label + ": " + std::string{message, len};
}("invokeHelper");
(*local)(Error{CassandraError{errMsg, rc}});
}
else
{
} else {
(*local)(Result{cass_future_get_result(ptr)});
}
}