chore: Fix errors/warnings in GCC13 (#1155)

* chore: Fix errors/warnings in GCC13

* OpResult: Add non const overloads to */-> so we can std::move from the result

* Run clang-format on file
This commit is contained in:
Roy Jacobson 2023-04-30 10:32:30 +03:00 committed by GitHub
parent 0cd2efebf1
commit 46093e33ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 3 deletions

View file

@ -3,6 +3,7 @@
//
#pragma once
#include <cstdint>
#include <string_view>
#include "core/core_types.h"

View file

@ -4,6 +4,8 @@
#pragma once
#include <string_view>
#include "core/dense_set.h"
extern "C" {

View file

@ -7,6 +7,8 @@
#include <cstdint>
#include <functional>
#include <optional>
#include <string>
#include <string_view>
#include "core/dense_set.h"

View file

@ -4,6 +4,7 @@
#pragma once
#include <cstdint>
#include <string_view>
#include <vector>
@ -75,4 +76,4 @@ class MemcacheParser {
private:
};
} // namespace dfly
} // namespace facade

View file

@ -4,6 +4,7 @@
#pragma once
#include <cstdint>
#include <ostream>
namespace facade {
@ -75,6 +76,14 @@ template <typename V> class OpResult : public OpResultBase {
return status() == OpStatus::OK ? v_ : v;
}
V* operator->() {
return &v_;
}
V& operator*() {
return v_;
}
const V* operator->() const {
return &v_;
}

View file

@ -1057,7 +1057,7 @@ optional<CapturingReplyBuilder::Payload> Service::FlushEvalAsyncCmds(ConnectionC
info->async_cmds_heap_mem = 0;
info->async_cmds.clear();
auto reply = move(crb.Take());
auto reply = crb.Take();
return CapturingReplyBuilder::GetError(reply) ? make_optional(move(reply)) : nullopt;
}