mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
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:
parent
0cd2efebf1
commit
46093e33ff
6 changed files with 18 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
//
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string_view>
|
||||
|
||||
#include "core/core_types.h"
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "core/dense_set.h"
|
||||
|
||||
extern "C" {
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "core/dense_set.h"
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
|
@ -75,4 +76,4 @@ class MemcacheParser {
|
|||
private:
|
||||
};
|
||||
|
||||
} // namespace dfly
|
||||
} // namespace facade
|
||||
|
|
|
@ -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_;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue