Fix Windows CMake build

This commit is contained in:
sfc-gh-tclinkenbeard 2020-10-08 09:31:19 -07:00
parent a9607bdcec
commit ccf2ca73f3
8 changed files with 11 additions and 19 deletions

View File

@ -943,14 +943,14 @@ namespace fileBackup {
Future<Void> handleError(Database cx, Reference<Task> task, Error const& error) final override {
return RestoreConfig(task).logError(cx, error, format("'%s' on '%s'", error.what(), task->params[Task::reservedTaskParamKeyType].printable().c_str()));
}
virtual std::string toString(Reference<Task> task) const override { return ""; }
virtual std::string toString(Reference<Task> task) const { return ""; }
};
struct BackupTaskFuncBase : TaskFuncBase {
Future<Void> handleError(Database cx, Reference<Task> task, Error const& error) final override {
return BackupConfig(task).logError(cx, error, format("'%s' on '%s'", error.what(), task->params[Task::reservedTaskParamKeyType].printable().c_str()));
}
virtual std::string toString(Reference<Task> task) const override { return ""; }
virtual std::string toString(Reference<Task> task) const { return ""; }
};
ACTOR static Future<Standalone<VectorRef<KeyRef>>> getBlockOfShards(Reference<ReadYourWritesTransaction> tr, Key beginKey, Key endKey, int limit) {

View File

@ -1125,7 +1125,7 @@ struct NameQuorumChange final : IQuorumChange {
CoordinatorsResult& t) override {
return otherChange->getDesiredCoordinators(tr, oldCoordinators, cf, t);
}
std::string getDesiredClusterKeyName() const override { return newName; }
std::string getDesiredClusterKeyName() const { return newName; }
};
Reference<IQuorumChange> nameQuorumChange(std::string const& name, Reference<IQuorumChange> const& other) {
return Reference<IQuorumChange>(new NameQuorumChange( name, other ));

View File

@ -84,7 +84,7 @@ class LambdaCallback final : public CallbackType, public FastAllocated<LambdaCal
func(t);
delete this;
}
void fire(T&& t) override {
void fire(T&& t) {
CallbackType::remove();
func(std::move(t));
delete this;

View File

@ -118,7 +118,7 @@ struct PolicyAcross final : IReplicationPolicy, public ReferenceCounted<PolicyAc
explicit PolicyAcross(const PolicyAcross& other) : PolicyAcross(other._count, other._attribKey, other._policy) {}
~PolicyAcross();
std::string name() const override { return "Across"; }
std::string embeddedPolicyName() const override { return _policy->name(); }
std::string embeddedPolicyName() const { return _policy->name(); }
int getCount() const { return _count; }
std::string info() const override { return format("%s^%d x ", _attribKey.c_str(), _count) + _policy->info(); }
int maxResults() const override { return _count * _policy->maxResults(); }

View File

@ -69,7 +69,7 @@ typedef std::pair<AttribKey, AttribValue> AttribRecord;
// This structure represents the LocalityData class as an integer map
struct KeyValueMap : public ReferenceCounted<KeyValueMap> {
struct KeyValueMap final : public ReferenceCounted<KeyValueMap> {
std::vector<AttribRecord> _keyvaluearray;
KeyValueMap() {}
@ -102,9 +102,6 @@ struct KeyValueMap : public ReferenceCounted<KeyValueMap> {
return ((lower != _keyvaluearray.end()) && (lower->first == indexKey) && (lower->second == indexValue));
}
void addref() override { ReferenceCounted<KeyValueMap>::addref(); }
void delref() override { ReferenceCounted<KeyValueMap>::delref(); }
static bool compareKeyValue(const AttribRecord& lhs, const AttribRecord& rhs)
{ return (lhs.first < rhs.first) || (!(rhs.first < lhs.first) && (lhs.second < rhs.second)); }
@ -112,7 +109,6 @@ struct KeyValueMap : public ReferenceCounted<KeyValueMap> {
{ return (lhs.first < rhs.first); }
};
// This class stores the information for each entry within the locality map
struct LocalityRecord final : public ReferenceCounted<LocalityRecord> {
Reference<KeyValueMap> _dataMap;
@ -125,9 +121,6 @@ struct LocalityRecord final : public ReferenceCounted<LocalityRecord> {
return *this;
}
void addref() override { ReferenceCounted<LocalityRecord>::addref(); }
void delref() override { ReferenceCounted<LocalityRecord>::delref(); }
Optional<AttribValue> getValue(AttribKey indexKey) const {
return _dataMap->getValue(indexKey);
}
@ -204,8 +197,6 @@ struct StringToIntMap final : public ReferenceCounted<StringToIntMap> {
}
return memSize;
}
void addref() override { ReferenceCounted<StringToIntMap>::addref(); }
void delref() override { ReferenceCounted<StringToIntMap>::delref(); }
};
extern const std::vector<LocalityEntry> emptyEntryArray;

View File

@ -65,7 +65,7 @@ public:
std::tuple<size_t, size_t, size_t> getSize() const override { return data.size(); }
int64_t getAvailableSize() const override {
int64_t getAvailableSize() const {
int64_t residentSize = data.sumTo(data.end()) + queue.totalSize() + // doesn't account for overhead in queue
transactionSize;

View File

@ -374,7 +374,7 @@ public:
void delref() override { ThreadSafeReferenceCounted<ThreadSingleAssignmentVar<T>>::delref(); }
void send(const T& value) override {
void send(const T& value) {
if (TRACE_SAMPLE()) TraceEvent(SevSample, "Promise_send");
this->mutex.enter();
if (!canBeSetUnsafe()) {

View File

@ -339,6 +339,7 @@ struct Callback {
Callback<T> *prev, *next;
virtual void fire(T const&) {}
virtual void fire(T&&) {}
virtual void error(Error) {}
virtual void unwait() {}
@ -534,8 +535,8 @@ public:
int getFutureReferenceCount() const { return futures; }
int getPromiseReferenceCount() const { return promises; }
virtual void destroy() override { delete this; }
virtual void cancel() override {}
virtual void destroy() { delete this; }
virtual void cancel() {}
void addCallbackAndDelFutureRef(Callback<T>* cb) {
// We are always *logically* dropping one future reference from this, but if we are adding a first callback