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
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
#include "core/core_types.h"
|
#include "core/core_types.h"
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
#include "core/dense_set.h"
|
#include "core/dense_set.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#include <string>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
#include "core/dense_set.h"
|
#include "core/dense_set.h"
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ class MemcacheParser {
|
||||||
|
|
||||||
union {
|
union {
|
||||||
uint64_t cas_unique = 0; // for CAS COMMAND
|
uint64_t cas_unique = 0; // for CAS COMMAND
|
||||||
uint64_t delta; // for DECR/INCR commands.
|
uint64_t delta; // for DECR/INCR commands.
|
||||||
};
|
};
|
||||||
|
|
||||||
uint32_t expire_ts = 0; // relative time in seconds.
|
uint32_t expire_ts = 0; // relative time in seconds.
|
||||||
|
@ -75,4 +76,4 @@ class MemcacheParser {
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dfly
|
} // namespace facade
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
namespace facade {
|
namespace facade {
|
||||||
|
@ -75,6 +76,14 @@ template <typename V> class OpResult : public OpResultBase {
|
||||||
return status() == OpStatus::OK ? v_ : v;
|
return status() == OpStatus::OK ? v_ : v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
V* operator->() {
|
||||||
|
return &v_;
|
||||||
|
}
|
||||||
|
|
||||||
|
V& operator*() {
|
||||||
|
return v_;
|
||||||
|
}
|
||||||
|
|
||||||
const V* operator->() const {
|
const V* operator->() const {
|
||||||
return &v_;
|
return &v_;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1057,7 +1057,7 @@ optional<CapturingReplyBuilder::Payload> Service::FlushEvalAsyncCmds(ConnectionC
|
||||||
info->async_cmds_heap_mem = 0;
|
info->async_cmds_heap_mem = 0;
|
||||||
info->async_cmds.clear();
|
info->async_cmds.clear();
|
||||||
|
|
||||||
auto reply = move(crb.Take());
|
auto reply = crb.Take();
|
||||||
return CapturingReplyBuilder::GetError(reply) ? make_optional(move(reply)) : nullopt;
|
return CapturingReplyBuilder::GetError(reply) ? make_optional(move(reply)) : nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue