1
0
Fork 0

Use explicit default destructors where possible (#10166)

This commit is contained in:
Tobias Gödderz 2019-10-04 15:58:30 +02:00 committed by Jan
parent 0da109bf82
commit e2c84acfaf
189 changed files with 224 additions and 229 deletions

View File

@ -56,7 +56,7 @@ class TRI_action_t {
_allowUseDatabase(false),
_isSystem(false) {}
virtual ~TRI_action_t() {}
virtual ~TRI_action_t() = default;
virtual void visit(void*) = 0;

View File

@ -57,7 +57,7 @@ ActiveFailoverJob::ActiveFailoverJob(Node const& snapshot, AgentInterface* agent
}
}
ActiveFailoverJob::~ActiveFailoverJob() {}
ActiveFailoverJob::~ActiveFailoverJob() = default;
void ActiveFailoverJob::run(bool& aborts) { runHelper(_server, "", aborts); }

View File

@ -63,7 +63,7 @@ AddFollower::AddFollower(Node const& snapshot, AgentInterface* agent,
}
}
AddFollower::~AddFollower() {}
AddFollower::~AddFollower() = default;
void AddFollower::run(bool& aborts) { runHelper("", _shard, aborts); }

View File

@ -73,7 +73,7 @@ AgencyFeature::AgencyFeature(application_features::ApplicationServer& server)
startsAfter<FoxxFeaturePhase>();
}
AgencyFeature::~AgencyFeature() {}
AgencyFeature::~AgencyFeature() = default;
void AgencyFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {
options->addSection("agency", "Configure the agency");

View File

@ -58,7 +58,7 @@ class AgentInterface {
virtual bool isCommitted(index_t last_entry) = 0;
// Suffice warnings
virtual ~AgentInterface() {}
virtual ~AgentInterface() = default;
};
} // namespace consensus
} // namespace arangodb

View File

@ -57,7 +57,7 @@ CleanOutServer::CleanOutServer(Node const& snapshot, AgentInterface* agent,
}
}
CleanOutServer::~CleanOutServer() {}
CleanOutServer::~CleanOutServer() = default;
void CleanOutServer::run(bool& aborts) { runHelper(_server, "", aborts); }

View File

@ -76,7 +76,7 @@ FailedFollower::FailedFollower(Node const& snapshot, AgentInterface* agent,
}
}
FailedFollower::~FailedFollower() {}
FailedFollower::~FailedFollower() = default;
void FailedFollower::run(bool& aborts) { runHelper("", _shard, aborts); }

View File

@ -79,7 +79,7 @@ FailedLeader::FailedLeader(Node const& snapshot, AgentInterface* agent,
}
}
FailedLeader::~FailedLeader() {}
FailedLeader::~FailedLeader() = default;
void FailedLeader::run(bool& aborts) { runHelper("", _shard, aborts); }

View File

@ -57,7 +57,7 @@ FailedServer::FailedServer(Node const& snapshot, AgentInterface* agent,
}
}
FailedServer::~FailedServer() {}
FailedServer::~FailedServer() = default;
void FailedServer::run(bool& aborts) { runHelper(_server, "", aborts); }

View File

@ -79,7 +79,7 @@ Job::Job(JOB_STATUS status, Node const& snapshot, AgentInterface* agent,
_creator(creator),
_jb(nullptr) {}
Job::~Job() {}
Job::~Job() = default;
// this will be initialized in the AgencyFeature
std::string Job::agencyPrefix = "arango";

View File

@ -94,7 +94,7 @@ MoveShard::MoveShard(Node const& snapshot, AgentInterface* agent,
}
}
MoveShard::~MoveShard() {}
MoveShard::~MoveShard() = default;
void MoveShard::run(bool& aborts) { runHelper(_to, _shard, aborts); }

View File

@ -112,7 +112,7 @@ Node::Node(std::string const& name, Store* store)
: _nodeName(name), _parent(nullptr), _store(store), _vecBufDirty(true), _isArray(false) {}
/// @brief Default dtor
Node::~Node() {}
Node::~Node() = default;
/// @brief Get slice to value buffer
Slice Node::slice() const {

View File

@ -64,7 +64,7 @@ RemoveFollower::RemoveFollower(Node const& snapshot, AgentInterface* agent,
}
}
RemoveFollower::~RemoveFollower() {}
RemoveFollower::~RemoveFollower() = default;
void RemoveFollower::run(bool& aborts) { runHelper("", _shard, aborts); }

View File

@ -57,7 +57,7 @@ ResignLeadership::ResignLeadership(Node const& snapshot, AgentInterface* agent,
}
}
ResignLeadership::~ResignLeadership() {}
ResignLeadership::~ResignLeadership() = default;
void ResignLeadership::run(bool& aborts) { runHelper(_server, "", aborts); }

View File

@ -71,7 +71,7 @@ State::State()
_cur(0) {}
/// Default dtor
State::~State() {}
State::~State() = default;
inline static std::string timestamp(uint64_t m) {

View File

@ -145,7 +145,7 @@ Store& Store::operator=(Store&& rhs) {
}
/// Default dtor
Store::~Store() {}
Store::~Store() = default;
/// Apply array of transactions multiple queries to store
/// Return vector of according success

View File

@ -39,7 +39,7 @@ ExecutionEngineResult::ExecutionEngineResult(ExecutionEngine* engine)
: _result(), _engine(engine) {}
// No responsibilty for the pointer
ExecutionEngineResult::~ExecutionEngineResult() {}
ExecutionEngineResult::~ExecutionEngineResult() = default;
ExecutionEngine* ExecutionEngineResult::engine() const { return _engine; }

View File

@ -190,7 +190,7 @@ Ast::Ast(Query* query)
}
/// @brief destroy the AST
Ast::~Ast() {}
Ast::~Ast() = default;
/// @brief convert the AST into VelocyPack
std::shared_ptr<VPackBuilder> Ast::toVelocyPack(bool verbose) const {

View File

@ -61,7 +61,7 @@ CollectNode::CollectNode(
_isDistinctCommand(isDistinctCommand),
_specialized(false) {}
CollectNode::~CollectNode() {}
CollectNode::~CollectNode() = default;
/// @brief toVelocyPack, for CollectNode
void CollectNode::toVelocyPackHelper(VPackBuilder& nodes, unsigned flags,
@ -440,7 +440,7 @@ ExecutionNode* CollectNode::clone(ExecutionPlan* plan, bool withDependencies,
struct UserVarFinder final : public WalkerWorker<ExecutionNode> {
explicit UserVarFinder(int mindepth) : mindepth(mindepth), depth(-1) {}
~UserVarFinder() {}
~UserVarFinder() = default;
std::vector<Variable const*> userVars;
int mindepth; // minimal depth to consider

View File

@ -324,7 +324,7 @@ ConditionPart::ConditionPart(Variable const* variable,
isExpanded = (attributeName.find("[*]") != std::string::npos);
}
ConditionPart::~ConditionPart() {}
ConditionPart::~ConditionPart() = default;
/// @brief true if the condition is completely covered by the other condition
bool ConditionPart::isCoveredBy(ConditionPart const& other, bool isReversed) const {

View File

@ -114,7 +114,7 @@ EngineInfoContainerCoordinator::EngineInfoContainerCoordinator() {
_engineStack.emplace(0);
}
EngineInfoContainerCoordinator::~EngineInfoContainerCoordinator() {}
EngineInfoContainerCoordinator::~EngineInfoContainerCoordinator() = default;
void EngineInfoContainerCoordinator::addNode(ExecutionNode* node) {
TRI_ASSERT(node->getType() != ExecutionNode::INDEX &&

View File

@ -61,7 +61,7 @@ class EngineInfoContainerDBServerServerBased {
std::unordered_map<ShardID, ServerID> const& shardMapping,
Query const& query);
~TraverserEngineShardLists() {}
~TraverserEngineShardLists() = default;
void serializeIntoBuilder(arangodb::velocypack::Builder& infoBuilder) const;

View File

@ -55,7 +55,7 @@ struct TraverserEngineShardLists {
edgeCollections.resize(length);
}
~TraverserEngineShardLists() {}
~TraverserEngineShardLists() = default;
// Mapping for edge collections to shardIds.
// We have to retain the ordering of edge collections, all

View File

@ -778,8 +778,7 @@ struct RegisterPlanningDebugger final : public WalkerWorker<ExecutionNode> {
: indent(0) {
}
~RegisterPlanningDebugger () {
}
~RegisterPlanningDebugger () = default;
int indent;
@ -1007,7 +1006,7 @@ RegisterId ExecutionNode::getNrOutputRegisters() const {
ExecutionNode::ExecutionNode(ExecutionPlan* plan, size_t id)
: _id(id), _depth(0), _varUsageValid(false), _plan(plan) {}
ExecutionNode::~ExecutionNode() {}
ExecutionNode::~ExecutionNode() = default;
size_t ExecutionNode::id() const { return _id; }
@ -1876,7 +1875,7 @@ struct SubqueryVarUsageFinder final : public WalkerWorker<ExecutionNode> {
SubqueryVarUsageFinder() {}
~SubqueryVarUsageFinder() {}
~SubqueryVarUsageFinder() = default;
bool before(ExecutionNode* en) override final {
// Add variables used here to _usedLater:
@ -1927,7 +1926,7 @@ struct DeterministicFinder final : public WalkerWorker<ExecutionNode> {
bool _isDeterministic = true;
DeterministicFinder() : _isDeterministic(true) {}
~DeterministicFinder() {}
~DeterministicFinder() = default;
bool enterSubquery(ExecutionNode*, ExecutionNode*) override final {
return false;

View File

@ -2426,7 +2426,7 @@ struct Shower final : public WalkerWorker<ExecutionNode> {
Shower() : indent(0) {}
~Shower() {}
~Shower() = default;
bool enterSubquery(ExecutionNode*, ExecutionNode*) override final {
indent++;

View File

@ -415,7 +415,7 @@ GraphNode::GraphNode(ExecutionPlan* plan, size_t id, TRI_vocbase_t* vocbase,
}
}
GraphNode::~GraphNode() {}
GraphNode::~GraphNode() = default;
std::string const& GraphNode::collectionToShardName(std::string const& collName) const {
if(_collectionToShard.empty()){

View File

@ -415,7 +415,7 @@ ExecutionNode* IndexNode::clone(ExecutionPlan* plan, bool withDependencies,
}
/// @brief destroy the IndexNode
IndexNode::~IndexNode() {}
IndexNode::~IndexNode() = default;
/// @brief the cost of an index node is a multiple of the cost of
/// its unique dependency

View File

@ -155,7 +155,7 @@ KShortestPathsNode::KShortestPathsNode(
_fromCondition(nullptr),
_toCondition(nullptr) {}
KShortestPathsNode::~KShortestPathsNode() {}
KShortestPathsNode::~KShortestPathsNode() = default;
KShortestPathsNode::KShortestPathsNode(ExecutionPlan* plan,
arangodb::velocypack::Slice const& base)

View File

@ -114,7 +114,7 @@ class Optimizer {
/// and add all methods there to the rules database
explicit Optimizer(size_t maxNumberOfPlans);
~Optimizer() {}
~Optimizer() = default;
/// @brief disable rules in the given plan, using the predicate function
void disableRules(ExecutionPlan* plan,

View File

@ -4849,7 +4849,7 @@ class RemoveToEnumCollFinder final : public WalkerWorker<ExecutionNode> {
_variable(nullptr),
_lastNode(nullptr) {}
~RemoveToEnumCollFinder() {}
~RemoveToEnumCollFinder() = default;
bool before(ExecutionNode* en) override final {
switch (en->getType()) {

View File

@ -52,7 +52,7 @@ Parser::Parser(Query* query)
}
/// @brief destroy the parser
Parser::~Parser() {}
Parser::~Parser() = default;
/// @brief set data for write queries
bool Parser::configureWriteQuery(AstNode const* collectionNode, AstNode* optionNode) {

View File

@ -41,7 +41,7 @@ static arangodb::aql::PlanCache Instance;
PlanCache::PlanCache() : _lock(), _plans() {}
/// @brief destroy the plan cache
PlanCache::~PlanCache() {}
PlanCache::~PlanCache() = default;
/// @brief lookup a plan in the cache
std::shared_ptr<PlanCacheEntry> PlanCache::lookup(TRI_vocbase_t* vocbase, uint64_t queryHash,

View File

@ -58,7 +58,7 @@ struct QueryResult {
: result(std::move(res)),
cached(false) {}
virtual ~QueryResult() {}
virtual ~QueryResult() = default;
void reset(Result const& res) {
result.reset(res);

View File

@ -88,7 +88,7 @@ struct RegisterPlan final : public WalkerWorker<ExecutionNode> {
// Copy constructor used for a subquery:
RegisterPlan(RegisterPlan const& v, unsigned int newdepth);
~RegisterPlan() {}
~RegisterPlan() = default;
virtual bool enterSubquery(ExecutionNode*, ExecutionNode*) override final {
return false; // do not walk into subquery
@ -111,4 +111,4 @@ struct RegisterPlan final : public WalkerWorker<ExecutionNode> {
} // namespace aql
} // namespace arangodb
#endif
#endif

View File

@ -31,7 +31,7 @@ using namespace arangodb::aql;
Scope::Scope(ScopeType type) : _type(type), _variables() {}
/// @brief destroy the scope
Scope::~Scope() {}
Scope::~Scope() = default;
/// @brief return the name of a scope type
std::string Scope::typeName() const { return typeName(_type); }
@ -117,7 +117,7 @@ Scopes::Scopes() : _activeScopes(), _currentVariables() {
}
/// @brief destroy the scopes
Scopes::~Scopes() {}
Scopes::~Scopes() = default;
/// @brief start a new scope
void Scopes::start(ScopeType type) {

View File

@ -153,7 +153,7 @@ ShortestPathNode::ShortestPathNode(
_fromCondition(nullptr),
_toCondition(nullptr) {}
ShortestPathNode::~ShortestPathNode() {}
ShortestPathNode::~ShortestPathNode() = default;
ShortestPathNode::ShortestPathNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& base)
: GraphNode(plan, base),

View File

@ -149,7 +149,7 @@ SortCondition::SortCondition(
}
/// @brief destroy the sort condition
SortCondition::~SortCondition() {}
SortCondition::~SortCondition() = default;
bool SortCondition::onlyUsesNonNullSortAttributes(
std::vector<std::vector<arangodb::basics::AttributeName>> const& attributes) const {

View File

@ -36,7 +36,7 @@ class TraversalConditionFinder : public WalkerWorker<ExecutionNode> {
public:
TraversalConditionFinder(ExecutionPlan* plan, bool* planAltered);
~TraversalConditionFinder() {}
~TraversalConditionFinder() = default;
bool before(ExecutionNode*) override final;

View File

@ -270,7 +270,7 @@ TraversalNode::TraversalNode(ExecutionPlan* plan, arangodb::velocypack::Slice co
#endif
}
TraversalNode::~TraversalNode() {}
TraversalNode::~TraversalNode() = default;
int TraversalNode::checkIsOutVariable(size_t variableId) const {
if (_vertexOutVariable != nullptr && _vertexOutVariable->id == variableId) {

View File

@ -66,7 +66,7 @@ class TraversalNode : public GraphNode {
TraversalEdgeConditionBuilder(TraversalNode const*, TraversalEdgeConditionBuilder const*);
~TraversalEdgeConditionBuilder() {}
~TraversalEdgeConditionBuilder() = default;
void toVelocyPack(arangodb::velocypack::Builder&, bool);
};

View File

@ -52,7 +52,7 @@ Variable::Variable(arangodb::velocypack::Slice const& slice)
}
/// @brief destroy the variable
Variable::~Variable() {}
Variable::~Variable() = default;
/// @brief return a VelocyPack representation of the variable
void Variable::toVelocyPack(VPackBuilder& builder) const {

View File

@ -73,7 +73,7 @@ class Handler {
std::string const& password) = 0;
/// Read user permissions assuming he was already authenticated once
virtual HandlerResult readPermissions(std::string const& username) = 0;
virtual ~Handler() {}
virtual ~Handler() = default;
};
} // namespace auth

View File

@ -67,7 +67,7 @@ CacheManagerFeature::CacheManagerFeature(application_features::ApplicationServer
startsAfter<BasicFeaturePhaseServer>();
}
CacheManagerFeature::~CacheManagerFeature() {}
CacheManagerFeature::~CacheManagerFeature() = default;
void CacheManagerFeature::collectOptions(std::shared_ptr<options::ProgramOptions> options) {
options->addSection("cache", "Configure the hash cache");

View File

@ -33,7 +33,7 @@ FreeMemoryTask::FreeMemoryTask(Manager::TaskEnvironment environment,
Manager* manager, std::shared_ptr<Cache> cache)
: _environment(environment), _manager(manager), _cache(cache) {}
FreeMemoryTask::~FreeMemoryTask() {}
FreeMemoryTask::~FreeMemoryTask() = default;
bool FreeMemoryTask::dispatch() {
_manager->prepareTask(_environment);
@ -62,7 +62,7 @@ MigrateTask::MigrateTask(Manager::TaskEnvironment environment, Manager* manager,
std::shared_ptr<Cache> cache, std::shared_ptr<Table> table)
: _environment(environment), _manager(manager), _cache(cache), _table(table) {}
MigrateTask::~MigrateTask() {}
MigrateTask::~MigrateTask() = default;
bool MigrateTask::dispatch() {
_manager->prepareTask(_environment);

View File

@ -120,7 +120,7 @@ Action::Action(MaintenanceFeature& feature, std::shared_ptr<ActionDescription> c
Action::Action(std::unique_ptr<ActionBase> action)
: _action(std::move(action)) {}
Action::~Action() {}
Action::~Action() = default;
void Action::create(MaintenanceFeature& feature, ActionDescription const& description) {
auto factory = factories.find(description.name());

View File

@ -65,7 +65,7 @@ void ActionBase::init() {
_actionDone = std::chrono::system_clock::duration::zero();
}
ActionBase::~ActionBase() {}
ActionBase::~ActionBase() = default;
void ActionBase::notify() {
LOG_TOPIC("df020", DEBUG, Logger::MAINTENANCE)

View File

@ -39,7 +39,7 @@ ActionDescription::ActionDescription(std::map<std::string, std::string> const& d
}
/// @brief Default dtor
ActionDescription::~ActionDescription() {}
ActionDescription::~ActionDescription() = default;
/// @brief Does this description have a "p" parameter?
bool ActionDescription::has(std::string const& p) const {

View File

@ -43,7 +43,7 @@ using namespace arangodb;
AgencyCallbackRegistry::AgencyCallbackRegistry(std::string const& callbackBasePath)
: _agency(), _callbackBasePath(callbackBasePath) {}
AgencyCallbackRegistry::~AgencyCallbackRegistry() {}
AgencyCallbackRegistry::~AgencyCallbackRegistry() = default;
bool AgencyCallbackRegistry::registerCallback(std::shared_ptr<AgencyCallback> cb) {
uint32_t rand;

View File

@ -353,7 +353,7 @@ struct ClusterCommResult {
struct ClusterCommCallback {
ClusterCommCallback() {}
virtual ~ClusterCommCallback() {}
virtual ~ClusterCommCallback() = default;
//////////////////////////////////////////////////////////////////////////////
/// @brief the actual callback function

View File

@ -46,7 +46,7 @@ class ClusterEdgeCursor : public graph::EdgeCursor {
// ShortestPath Variant
ClusterEdgeCursor(arangodb::velocypack::StringRef vid, bool isBackward, graph::BaseOptions*);
~ClusterEdgeCursor() {}
~ClusterEdgeCursor() = default;
bool next(EdgeCursor::Callback const& callback) override;

View File

@ -172,7 +172,7 @@ CollectionInfoCurrent::CollectionInfoCurrent(uint64_t currentVersion)
/// @brief destroys a collection info object
////////////////////////////////////////////////////////////////////////////////
CollectionInfoCurrent::~CollectionInfoCurrent() {}
CollectionInfoCurrent::~CollectionInfoCurrent() = default;
////////////////////////////////////////////////////////////////////////////////
/// @brief creates a cluster info object
@ -199,7 +199,7 @@ ClusterInfo::ClusterInfo(application_features::ApplicationServer& server,
/// @brief destroys a cluster info object
////////////////////////////////////////////////////////////////////////////////
ClusterInfo::~ClusterInfo() {}
ClusterInfo::~ClusterInfo() = default;
////////////////////////////////////////////////////////////////////////////////
/// @brief cleanup method which frees cluster-internal shared ptrs on shutdown

View File

@ -48,7 +48,7 @@ class ClusterTraverser final : public Traverser {
std::unordered_map<ServerID, traverser::TraverserEngineID> const* engines,
std::string const& dbname, transaction::Methods* trx);
~ClusterTraverser() {}
~ClusterTraverser() = default;
void setStartVertex(std::string const& id) override;

View File

@ -103,7 +103,7 @@ CreateCollection::CreateCollection(MaintenanceFeature& feature, ActionDescriptio
}
}
CreateCollection::~CreateCollection() {}
CreateCollection::~CreateCollection() = default;
bool CreateCollection::first() {
auto const& database = _description.get(DATABASE);

View File

@ -58,7 +58,7 @@ CreateDatabase::CreateDatabase(MaintenanceFeature& feature, ActionDescription co
}
}
CreateDatabase::~CreateDatabase() {}
CreateDatabase::~CreateDatabase() = default;
bool CreateDatabase::first() {
VPackSlice users;

View File

@ -40,7 +40,7 @@ class CriticalThread : public Thread {
std::string const& name, bool deleteOnExit = false)
: Thread(server, name, deleteOnExit) {}
virtual ~CriticalThread() {}
virtual ~CriticalThread() = default;
//////////////////////////////////////////////////////////////////////////////
/// @brief Notification of when thread crashes via uncaught throw ... log it

View File

@ -63,7 +63,7 @@ DropCollection::DropCollection(MaintenanceFeature& feature, ActionDescription co
}
}
DropCollection::~DropCollection() {}
DropCollection::~DropCollection() = default;
bool DropCollection::first() {
auto const& database = _description.get(DATABASE);

View File

@ -56,7 +56,7 @@ DropDatabase::DropDatabase(MaintenanceFeature& feature, ActionDescription const&
}
}
DropDatabase::~DropDatabase() {}
DropDatabase::~DropDatabase() = default;
bool DropDatabase::first() {
std::string const database = _description.get(DATABASE);

View File

@ -66,7 +66,7 @@ DropIndex::DropIndex(MaintenanceFeature& feature, ActionDescription const& d)
}
}
DropIndex::~DropIndex() {}
DropIndex::~DropIndex() = default;
bool DropIndex::first() {
auto const& database = _description.get(DATABASE);

View File

@ -85,7 +85,7 @@ EnsureIndex::EnsureIndex(MaintenanceFeature& feature, ActionDescription const& d
}
}
EnsureIndex::~EnsureIndex() {}
EnsureIndex::~EnsureIndex() = default;
bool EnsureIndex::first() {
arangodb::Result res;

View File

@ -50,7 +50,7 @@ class MaintenanceFeature : public application_features::ApplicationFeature {
public:
explicit MaintenanceFeature(application_features::ApplicationServer&);
virtual ~MaintenanceFeature() {}
virtual ~MaintenanceFeature() = default;
struct errors_t {
std::map<std::string, std::map<std::string, std::shared_ptr<VPackBuffer<uint8_t>>>> indexes;

View File

@ -49,4 +49,4 @@ bool NonAction::first() {
return false;
}
NonAction::~NonAction() {}
NonAction::~NonAction() = default;

View File

@ -75,7 +75,7 @@ ResignShardLeadership::ResignShardLeadership(MaintenanceFeature& feature,
}
}
ResignShardLeadership::~ResignShardLeadership() {}
ResignShardLeadership::~ResignShardLeadership() = default;
bool ResignShardLeadership::first() {
std::string const& database = _description.get(DATABASE);

View File

@ -146,7 +146,7 @@ void ServerState::findHost(std::string const& fallback) {
_host = fallback;
}
ServerState::~ServerState() {}
ServerState::~ServerState() = default;
////////////////////////////////////////////////////////////////////////////////
/// @brief create the (sole) instance

View File

@ -119,7 +119,7 @@ SynchronizeShard::SynchronizeShard(MaintenanceFeature& feature, ActionDescriptio
}
}
SynchronizeShard::~SynchronizeShard() {}
SynchronizeShard::~SynchronizeShard() = default;
class SynchronizeShardCallback : public arangodb::ClusterCommCallback {
public:

View File

@ -95,7 +95,7 @@ TakeoverShardLeadership::TakeoverShardLeadership(MaintenanceFeature& feature,
}
}
TakeoverShardLeadership::~TakeoverShardLeadership() {}
TakeoverShardLeadership::~TakeoverShardLeadership() = default;
static void sendLeaderChangeRequests(std::vector<ServerID> const& currentServers,
std::shared_ptr<std::vector<ServerID>>& realInsyncFollowers,

View File

@ -283,7 +283,7 @@ BaseTraverserEngine::BaseTraverserEngine(TRI_vocbase_t& vocbase,
VPackSlice info, bool needToLock)
: BaseEngine(vocbase, ctx, info, needToLock), _opts(nullptr) {}
BaseTraverserEngine::~BaseTraverserEngine() {}
BaseTraverserEngine::~BaseTraverserEngine() = default;
void BaseTraverserEngine::getEdges(VPackSlice vertex, size_t depth, VPackBuilder& builder) {
// We just hope someone has locked the shards properly. We have no clue...
@ -427,7 +427,7 @@ ShortestPathEngine::ShortestPathEngine(TRI_vocbase_t& vocbase,
_opts->activateCache(false, nullptr);
}
ShortestPathEngine::~ShortestPathEngine() {}
ShortestPathEngine::~ShortestPathEngine() = default;
void ShortestPathEngine::getEdges(VPackSlice vertex, bool backward, VPackBuilder& builder) {
// We just hope someone has locked the shards properly. We have no clue...
@ -514,7 +514,7 @@ TraverserEngine::TraverserEngine(TRI_vocbase_t& vocbase,
_opts->activateCache(false, nullptr);
}
TraverserEngine::~TraverserEngine() {}
TraverserEngine::~TraverserEngine() = default;
void TraverserEngine::smartSearch(VPackSlice, VPackBuilder&) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_ONLY_ENTERPRISE);

View File

@ -50,7 +50,7 @@ TraverserEngineRegistry::EngineInfo::EngineInfo(TRI_vocbase_t& vocbase,
_timeToLive(0),
_expires(0) {}
TraverserEngineRegistry::EngineInfo::~EngineInfo() {}
TraverserEngineRegistry::EngineInfo::~EngineInfo() = default;
TraverserEngineRegistry::~TraverserEngineRegistry() {
WRITE_LOCKER(writeLocker, _lock);

View File

@ -78,7 +78,7 @@ UpdateCollection::UpdateCollection(MaintenanceFeature& feature, ActionDescriptio
}
}
UpdateCollection::~UpdateCollection() {}
UpdateCollection::~UpdateCollection() = default;
bool UpdateCollection::first() {
auto const& database = _description.get(DATABASE);

View File

@ -106,7 +106,7 @@ ClusterCollection::ClusterCollection(LogicalCollection& collection,
_info(static_cast<ClusterCollection const*>(physical)->_info),
_selectivityEstimates(collection) {}
ClusterCollection::~ClusterCollection() {}
ClusterCollection::~ClusterCollection() = default;
/// @brief fetches current index selectivity estimates
/// if allowUpdate is true, will potentially make a cluster-internal roundtrip

View File

@ -75,7 +75,7 @@ ClusterEngine::ClusterEngine(application_features::ApplicationServer& server)
setOptional(true);
}
ClusterEngine::~ClusterEngine() {}
ClusterEngine::~ClusterEngine() = default;
bool ClusterEngine::isRocksDB() const {
return !ClusterEngine::Mocking && _actualEngine &&

View File

@ -75,7 +75,7 @@ ClusterIndex::ClusterIndex(TRI_idx_iid_t id, LogicalCollection& collection,
}
}
ClusterIndex::~ClusterIndex() {}
ClusterIndex::~ClusterIndex() = default;
void ClusterIndex::toVelocyPackFigures(VPackBuilder& builder) const {
TRI_ASSERT(builder.isOpenObject());

View File

@ -33,7 +33,7 @@ class ClusterRestReplicationHandler : public RestReplicationHandler {
public:
ClusterRestReplicationHandler(application_features::ApplicationServer&,
GeneralRequest*, GeneralResponse*);
~ClusterRestReplicationHandler() {}
~ClusterRestReplicationHandler() = default;
public:
char const* name() const override final {

View File

@ -40,7 +40,7 @@ ClusterTransactionCollection::ClusterTransactionCollection(TransactionState* trx
int nestingLevel)
: TransactionCollection(trx, cid, accessType, nestingLevel) {}
ClusterTransactionCollection::~ClusterTransactionCollection() {}
ClusterTransactionCollection::~ClusterTransactionCollection() = default;
/// @brief whether or not any write operations for the collection happened
bool ClusterTransactionCollection::hasOperations() const {

View File

@ -33,7 +33,7 @@ namespace arangodb {
class ClusterTransactionManager final : public TransactionManager {
public:
ClusterTransactionManager() : TransactionManager(), _nrRunning(0) {}
~ClusterTransactionManager() {}
~ClusterTransactionManager() = default;
// register a list of failed transactions
void registerFailedTransactions(std::unordered_set<TRI_voc_tid_t> const& failedTransactions) override {

View File

@ -32,7 +32,7 @@ class ClusterTransactionState final : public TransactionState {
public:
ClusterTransactionState(TRI_vocbase_t& vocbase, TRI_voc_tid_t tid,
transaction::Options const& options);
~ClusterTransactionState() {}
~ClusterTransactionState() = default;
/// @brief begin a transaction
Result beginTransaction(transaction::Hints hints) override;

View File

@ -37,7 +37,7 @@ class Acceptor {
public:
Acceptor(rest::GeneralServer& server, rest::IoContext& context, Endpoint* endpoint);
virtual ~Acceptor() {}
virtual ~Acceptor() = default;
public:
virtual void open() = 0;

View File

@ -58,7 +58,7 @@ AsyncJobResult::AsyncJobResult(IdType jobId, Status status,
_status(status),
_handler(std::move(handler)) {}
AsyncJobResult::~AsyncJobResult() {}
AsyncJobResult::~AsyncJobResult() = default;
AsyncJobManager::AsyncJobManager() : _lock(), _jobs() {}

View File

@ -41,7 +41,7 @@ GeneralCommTask<T>::GeneralCommTask(GeneralServer& server, char const* name,
: CommTask(server, name, std::move(info)), _protocol(std::move(socket)) {}
template <SocketType T>
GeneralCommTask<T>::~GeneralCommTask() {}
GeneralCommTask<T>::~GeneralCommTask() = default;
template <SocketType T>
void GeneralCommTask<T>::start() {

View File

@ -58,7 +58,7 @@ GeneralServer::GeneralServer(GeneralServerFeature& feature, uint64_t numIoThread
}
}
GeneralServer::~GeneralServer() {}
GeneralServer::~GeneralServer() = default;
void GeneralServer::registerTask(std::shared_ptr<CommTask> task) {
auto& server = application_features::ApplicationServer::server();

View File

@ -235,7 +235,7 @@ HttpCommTask<T>::HttpCommTask(GeneralServer& server, ConnectionInfo info,
}
template <SocketType T>
HttpCommTask<T>::~HttpCommTask() {}
HttpCommTask<T>::~HttpCommTask() = default;
template <SocketType T>
void HttpCommTask<T>::start() {

View File

@ -161,7 +161,7 @@ AttributeWeightShortestPathFinder::AttributeWeightShortestPathFinder(ShortestPat
_intermediateSet(false),
_intermediate() {}
AttributeWeightShortestPathFinder::~AttributeWeightShortestPathFinder() {}
AttributeWeightShortestPathFinder::~AttributeWeightShortestPathFinder() = default;
bool AttributeWeightShortestPathFinder::shortestPath(arangodb::velocypack::Slice const& st,
arangodb::velocypack::Slice const& ta,

View File

@ -44,7 +44,7 @@ BreadthFirstEnumerator::PathStep::PathStep(size_t sourceIdx, EdgeDocumentToken&&
arangodb::velocypack::StringRef const vertex)
: sourceIdx(sourceIdx), edge(edge), vertex(vertex) {}
BreadthFirstEnumerator::PathStep::~PathStep() {}
BreadthFirstEnumerator::PathStep::~PathStep() = default;
BreadthFirstEnumerator::BreadthFirstEnumerator(Traverser* traverser, VPackSlice startVertex,
TraverserOptions* opts)
@ -61,7 +61,7 @@ BreadthFirstEnumerator::BreadthFirstEnumerator(Traverser* traverser, VPackSlice
_toSearch.emplace_back(NextStep(0));
}
BreadthFirstEnumerator::~BreadthFirstEnumerator() {}
BreadthFirstEnumerator::~BreadthFirstEnumerator() = default;
bool BreadthFirstEnumerator::next() {
if (_isFirst) {

View File

@ -51,7 +51,7 @@ class ClusterTraverserCache : public TraverserCache {
ClusterTraverserCache(aql::Query* query,
std::unordered_map<ServerID, traverser::TraverserEngineID> const* engines, BaseOptions const*);
~ClusterTraverserCache() {}
~ClusterTraverserCache() = default;
/// @brief will convert the EdgeDocumentToken to a slice
arangodb::velocypack::Slice lookupToken(EdgeDocumentToken const& token) override;

View File

@ -45,7 +45,7 @@ struct EdgeDocumentToken;
class EdgeCursor {
public:
EdgeCursor() {}
virtual ~EdgeCursor() {}
virtual ~EdgeCursor() = default;
using Callback =
std::function<void(EdgeDocumentToken&&, arangodb::velocypack::Slice, size_t)>;

View File

@ -151,7 +151,7 @@ struct EdgeDocumentToken {
struct LocalDocument {
TRI_voc_cid_t cid;
LocalDocumentId localDocumentId;
~LocalDocument() {}
~LocalDocument() = default;
};
/// fixed size union, works for both single server and
@ -174,7 +174,7 @@ struct EdgeDocumentToken {
return *this;
}
~TokenData() {}
~TokenData() = default;
};
static_assert(sizeof(TokenData::document) >= sizeof(TokenData::vpack),

View File

@ -45,7 +45,7 @@ using namespace arangodb::graph;
//
KShortestPathsFinder::KShortestPathsFinder(ShortestPathOptions& options)
: ShortestPathFinder(options), _pathAvailable(false) {}
KShortestPathsFinder::~KShortestPathsFinder() {}
KShortestPathsFinder::~KShortestPathsFinder() = default;
// Sets up k-shortest-paths traversal from start to end
bool KShortestPathsFinder::startKShortestPathsTraversal(

View File

@ -160,7 +160,7 @@ class KShortestPathsFinder : public ShortestPathFinder {
: _centre(centre), _direction(direction) {
_frontier.insert(centre, std::make_unique<DijkstraInfo>(centre));
}
~Ball() {}
~Ball() = default;
};
//

View File

@ -53,7 +53,7 @@ class NeighborsEnumerator final : public arangodb::traverser::PathEnumerator {
arangodb::velocypack::Slice const& startVertex,
arangodb::traverser::TraverserOptions* opts);
~NeighborsEnumerator() {}
~NeighborsEnumerator() = default;
//////////////////////////////////////////////////////////////////////////////
/// @brief Get the next Path element from the traversal.

View File

@ -52,7 +52,7 @@ DepthFirstEnumerator::DepthFirstEnumerator(Traverser* traverser, std::string con
TraverserOptions* opts)
: PathEnumerator(traverser, startVertex, opts), _pruneNext(false) {}
DepthFirstEnumerator::~DepthFirstEnumerator() {}
DepthFirstEnumerator::~DepthFirstEnumerator() = default;
bool DepthFirstEnumerator::next() {
if (_isFirst) {

View File

@ -91,7 +91,7 @@ class PathEnumerator {
PathEnumerator(Traverser* traverser, std::string const& startVertex,
TraverserOptions* opts);
virtual ~PathEnumerator() {}
virtual ~PathEnumerator() = default;
//////////////////////////////////////////////////////////////////////////////
/// @brief Compute the next Path element from the traversal.

View File

@ -38,7 +38,7 @@ class ShortestPathFinder {
explicit ShortestPathFinder(ShortestPathOptions& options);
public:
virtual ~ShortestPathFinder() {}
virtual ~ShortestPathFinder() = default;
virtual bool shortestPath(arangodb::velocypack::Slice const& start,
arangodb::velocypack::Slice const& target,

View File

@ -98,7 +98,7 @@ ShortestPathOptions::ShortestPathOptions(aql::Query* query, VPackSlice info, VPa
}
}
ShortestPathOptions::~ShortestPathOptions() {}
ShortestPathOptions::~ShortestPathOptions() = default;
void ShortestPathOptions::buildEngineInfo(VPackBuilder& result) const {
result.openObject();

View File

@ -42,7 +42,7 @@ using namespace arangodb::traverser;
ShortestPathResult::ShortestPathResult() : _readDocuments(0) {}
ShortestPathResult::~ShortestPathResult() {}
ShortestPathResult::~ShortestPathResult() = default;
/// @brief Clears the path
void ShortestPathResult::clear() {

View File

@ -38,7 +38,7 @@ using namespace arangodb::graph;
SingleServerTraverser::SingleServerTraverser(TraverserOptions* opts, transaction::Methods* trx)
: Traverser(opts, trx) {}
SingleServerTraverser::~SingleServerTraverser() {}
SingleServerTraverser::~SingleServerTraverser() = default;
void SingleServerTraverser::addVertexToVelocyPack(arangodb::velocypack::StringRef vid, VPackBuilder& result) {
_opts->cache()->insertVertexIntoResult(vid, result);

View File

@ -158,7 +158,7 @@ Traverser::Traverser(arangodb::traverser::TraverserOptions* opts, transaction::M
}
}
Traverser::~Traverser() {}
Traverser::~Traverser() = default;
bool arangodb::traverser::Traverser::edgeMatchesConditions(VPackSlice e,
arangodb::velocypack::StringRef vid,

View File

@ -73,7 +73,7 @@ class TraversalPath {
TraversalPath() : _readDocuments(0) {}
virtual ~TraversalPath() {}
virtual ~TraversalPath() = default;
//////////////////////////////////////////////////////////////////////////////
/// @brief Builds the complete path as VelocyPack

View File

@ -55,7 +55,7 @@ TraverserCache::TraverserCache(aql::Query* query, BaseOptions const* opts)
_baseOptions(opts) {
}
TraverserCache::~TraverserCache() {}
TraverserCache::~TraverserCache() = default;
void TraverserCache::clear() {
_stringHeap->clear();

View File

@ -248,7 +248,7 @@ Index::Index(TRI_idx_iid_t iid, arangodb::LogicalCollection& collection, VPackSl
_sparse(arangodb::basics::VelocyPackHelper::getBooleanValue(slice, arangodb::StaticStrings::IndexSparse,
false)) {}
Index::~Index() {}
Index::~Index() = default;
void Index::name(std::string const& newName) {
if (_name.empty()) {

View File

@ -79,7 +79,7 @@ class IndexIterator {
IndexIterator(LogicalCollection*, transaction::Methods*);
virtual ~IndexIterator() {}
virtual ~IndexIterator() = default;
virtual char const* typeName() const = 0;
@ -137,7 +137,7 @@ class EmptyIndexIterator final : public IndexIterator {
EmptyIndexIterator(LogicalCollection* collection, transaction::Methods* trx)
: IndexIterator(collection, trx) {}
~EmptyIndexIterator() {}
~EmptyIndexIterator() = default;
char const* typeName() const override { return "empty-index-iterator"; }

View File

@ -653,7 +653,7 @@ MMFilesCollection::MMFilesCollection(LogicalCollection& logical,
// _revisionsCache;
}
MMFilesCollection::~MMFilesCollection() {}
MMFilesCollection::~MMFilesCollection() = default;
TRI_voc_rid_t MMFilesCollection::revision(arangodb::transaction::Methods*) const {
return _lastRevision;

Some files were not shown because too many files have changed in this diff Show More