Remove several nonsensical const uses
These seem to be all the ones that clang's -Wignored-qualifiers complains about
This commit is contained in:
parent
221e94fd01
commit
b7b5d2ead3
|
@ -93,7 +93,7 @@ struct struct_like_traits<Tag> : std::true_type {
|
|||
}
|
||||
|
||||
template <int i, class Type, class Context>
|
||||
static const void assign(Member& m, const Type& t, Context&) {
|
||||
static void assign(Member& m, const Type& t, Context&) {
|
||||
if constexpr (i == 0) {
|
||||
m.id = t;
|
||||
} else {
|
||||
|
|
|
@ -572,8 +572,8 @@ namespace fileBackup {
|
|||
|
||||
// Functions for consuming big endian (network byte order) integers.
|
||||
// Consumes a big endian number, swaps it to little endian, and returns it.
|
||||
const int32_t consumeNetworkInt32() { return (int32_t)bigEndian32((uint32_t)consume< int32_t>());}
|
||||
const uint32_t consumeNetworkUInt32() { return bigEndian32( consume<uint32_t>());}
|
||||
int32_t consumeNetworkInt32() { return (int32_t)bigEndian32((uint32_t)consume< int32_t>());}
|
||||
uint32_t consumeNetworkUInt32() { return bigEndian32( consume<uint32_t>());}
|
||||
|
||||
bool eof() { return rptr == end; }
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@ const Value restoreRequestTriggerValue(UID randomID, int const numRequests) {
|
|||
wr << randomID;
|
||||
return wr.toValue();
|
||||
}
|
||||
const int decodeRestoreRequestTriggerValue(ValueRef const& value) {
|
||||
int decodeRestoreRequestTriggerValue(ValueRef const& value) {
|
||||
int s;
|
||||
UID randomID;
|
||||
BinaryReader reader(value, IncludeVersion());
|
||||
|
|
|
@ -302,7 +302,7 @@ const Key restoreWorkerKeyFor(UID const& workerID);
|
|||
const Value restoreWorkerInterfaceValue(RestoreWorkerInterface const& server);
|
||||
RestoreWorkerInterface decodeRestoreWorkerInterfaceValue(ValueRef const& value);
|
||||
const Value restoreRequestTriggerValue(UID randomUID, int const numRequests);
|
||||
const int decodeRestoreRequestTriggerValue(ValueRef const& value);
|
||||
int decodeRestoreRequestTriggerValue(ValueRef const& value);
|
||||
const Value restoreRequestDoneVersionValue(Version readVersion);
|
||||
Version decodeRestoreRequestDoneVersionValue(ValueRef const& value);
|
||||
const Key restoreRequestKeyFor(int const& index);
|
||||
|
|
|
@ -322,8 +322,8 @@ struct StringRefReader {
|
|||
|
||||
// Functions for consuming big endian (network byte order) integers.
|
||||
// Consumes a big endian number, swaps it to little endian, and returns it.
|
||||
const int32_t consumeNetworkInt32() { return (int32_t)bigEndian32((uint32_t)consume<int32_t>()); }
|
||||
const uint32_t consumeNetworkUInt32() { return bigEndian32(consume<uint32_t>()); }
|
||||
int32_t consumeNetworkInt32() { return (int32_t)bigEndian32((uint32_t)consume<int32_t>()); }
|
||||
uint32_t consumeNetworkUInt32() { return bigEndian32(consume<uint32_t>()); }
|
||||
|
||||
bool eof() { return rptr == end; }
|
||||
|
||||
|
|
|
@ -90,12 +90,12 @@ struct StringRefReaderMX {
|
|||
|
||||
// Functions for consuming big endian (network byte oselfer) integers.
|
||||
// Consumes a big endian number, swaps it to little endian, and returns it.
|
||||
const int32_t consumeNetworkInt32() { return (int32_t)bigEndian32((uint32_t)consume<int32_t>()); }
|
||||
const uint32_t consumeNetworkUInt32() { return bigEndian32(consume<uint32_t>()); }
|
||||
int32_t consumeNetworkInt32() { return (int32_t)bigEndian32((uint32_t)consume<int32_t>()); }
|
||||
uint32_t consumeNetworkUInt32() { return bigEndian32(consume<uint32_t>()); }
|
||||
|
||||
// Convert big Endian value (e.g., encoded in log file) into a littleEndian uint64_t value.
|
||||
const int64_t consumeNetworkInt64() { return (int64_t)bigEndian64((uint32_t)consume<int64_t>()); }
|
||||
const uint64_t consumeNetworkUInt64() { return bigEndian64(consume<uint64_t>()); }
|
||||
int64_t consumeNetworkInt64() { return (int64_t)bigEndian64((uint32_t)consume<int64_t>()); }
|
||||
uint64_t consumeNetworkUInt64() { return bigEndian64(consume<uint64_t>()); }
|
||||
|
||||
bool eof() { return rptr == end; }
|
||||
|
||||
|
|
|
@ -468,7 +468,7 @@ struct union_like_traits<Optional<T>> : std::true_type {
|
|||
}
|
||||
|
||||
template <size_t i, class U, class Context>
|
||||
static const void assign(Member& member, const U& t, Context&) {
|
||||
static void assign(Member& member, const U& t, Context&) {
|
||||
member = t;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -133,7 +133,7 @@ struct union_like_traits : std::false_type {
|
|||
static const index_t<i, alternatives>& get(const Member&, Context&);
|
||||
|
||||
template <int i, class Alternative, class Context>
|
||||
static const void assign(Member&, const Alternative&, Context&);
|
||||
static void assign(Member&, const Alternative&, Context&);
|
||||
|
||||
template <class Context>
|
||||
static void done(Member&, Context&);
|
||||
|
@ -150,7 +150,7 @@ struct struct_like_traits : std::false_type {
|
|||
static const index_t<i, types>& get(const Member&, Context&);
|
||||
|
||||
template <int i, class Context>
|
||||
static const void assign(Member&, const index_t<i, types>&, Context&);
|
||||
static void assign(Member&, const index_t<i, types>&, Context&);
|
||||
|
||||
template <class Context>
|
||||
static void done(Member&, Context&);
|
||||
|
@ -175,7 +175,7 @@ struct union_like_traits<boost::variant<Alternatives...>> : std::true_type {
|
|||
}
|
||||
|
||||
template <size_t i, class Alternative, class Context>
|
||||
static const void assign(Member& member, const Alternative& a, Context&) {
|
||||
static void assign(Member& member, const Alternative& a, Context&) {
|
||||
static_assert(std::is_same_v<index_t<i, alternatives>, Alternative>);
|
||||
member = a;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ struct struct_like_traits<std::tuple<Ts...>> : std::true_type {
|
|||
}
|
||||
|
||||
template <int i, class Type, class Context>
|
||||
static const void assign(Member& m, const Type& t, Context&) {
|
||||
static void assign(Member& m, const Type& t, Context&) {
|
||||
std::get<i>(m) = t;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -225,7 +225,7 @@ struct union_like_traits<ErrorOr<T>> : std::true_type {
|
|||
}
|
||||
|
||||
template <int i, class Alternative, class Context>
|
||||
static const void assign(Member& m, const Alternative& a, Context&) {
|
||||
static void assign(Member& m, const Alternative& a, Context&) {
|
||||
if constexpr (i == 0) {
|
||||
m = a;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue