diff --git a/arangod/Pregel/Algos/AsyncSCC.cpp b/arangod/Pregel/Algos/AsyncSCC.cpp index a644b16619..0bd0806fc8 100644 --- a/arangod/Pregel/Algos/AsyncSCC.cpp +++ b/arangod/Pregel/Algos/AsyncSCC.cpp @@ -154,7 +154,7 @@ struct SCCGraphFormat : public GraphFormat { const std::string _resultField; uint64_t vertexIdRange = 0; - SCCGraphFormat(std::string const& result) : _resultField(result) {} + explicit SCCGraphFormat(std::string const& result) : _resultField(result) {} void willLoadVertices(uint64_t count) override { // if we aren't running in a cluster it doesn't matter diff --git a/arangod/Pregel/Algos/AsyncSCC.h b/arangod/Pregel/Algos/AsyncSCC.h index 9262818b45..2fe7096bad 100644 --- a/arangod/Pregel/Algos/AsyncSCC.h +++ b/arangod/Pregel/Algos/AsyncSCC.h @@ -47,7 +47,7 @@ namespace algos { struct AsyncSCC : public SimpleAlgorithm> { public: - AsyncSCC(VPackSlice userParams) + explicit AsyncSCC(VPackSlice userParams) : SimpleAlgorithm>( "AsyncSCC", userParams) {} diff --git a/arangod/Pregel/Algos/ConnectedComponents.cpp b/arangod/Pregel/Algos/ConnectedComponents.cpp index 0baf5d6214..d979c8c851 100644 --- a/arangod/Pregel/Algos/ConnectedComponents.cpp +++ b/arangod/Pregel/Algos/ConnectedComponents.cpp @@ -56,7 +56,7 @@ ConnectedComponents::createComputation(WorkerConfig const* config) const { struct MyGraphFormat : public VertexGraphFormat { uint64_t vertexIdRange = 0; - MyGraphFormat(std::string const& result) + explicit MyGraphFormat(std::string const& result) : VertexGraphFormat(result, 0) {} void willLoadVertices(uint64_t count) override { diff --git a/arangod/Pregel/Algos/ConnectedComponents.h b/arangod/Pregel/Algos/ConnectedComponents.h index bbaae547b8..e6b73a1b2e 100644 --- a/arangod/Pregel/Algos/ConnectedComponents.h +++ b/arangod/Pregel/Algos/ConnectedComponents.h @@ -36,7 +36,7 @@ namespace algos { /// doesn't necessarily leads to a correct result on unidirected graphs struct ConnectedComponents : public SimpleAlgorithm { public: - ConnectedComponents(VPackSlice userParams) + explicit ConnectedComponents(VPackSlice userParams) : SimpleAlgorithm("ConnectedComponents", userParams) {} bool supportsAsyncMode() const override { return true; } diff --git a/arangod/Pregel/Algos/DMID/DMID.cpp b/arangod/Pregel/Algos/DMID/DMID.cpp index aef27a8793..0d70af5e31 100644 --- a/arangod/Pregel/Algos/DMID/DMID.cpp +++ b/arangod/Pregel/Algos/DMID/DMID.cpp @@ -584,7 +584,7 @@ struct DMIDGraphFormat : public GraphFormat { const std::string _resultField; uint64_t vertexIdRange = 0; - DMIDGraphFormat(std::string const& result) : _resultField(result) {} + explicit DMIDGraphFormat(std::string const& result) : _resultField(result) {} void willLoadVertices(uint64_t count) override { // if we aren't running in a cluster it doesn't matter diff --git a/arangod/Pregel/Algos/DMID/DMID.h b/arangod/Pregel/Algos/DMID/DMID.h index 53889056d1..1a9ff7ca13 100644 --- a/arangod/Pregel/Algos/DMID/DMID.h +++ b/arangod/Pregel/Algos/DMID/DMID.h @@ -34,7 +34,7 @@ namespace algos { struct DMID : public SimpleAlgorithm { public: - DMID(VPackSlice userParams) : SimpleAlgorithm( + explicit DMID(VPackSlice userParams) : SimpleAlgorithm( "DMID", userParams) {} GraphFormat* inputFormat() const override; diff --git a/arangod/Pregel/Algos/EffectiveCloseness/EffectiveCloseness.cpp b/arangod/Pregel/Algos/EffectiveCloseness/EffectiveCloseness.cpp index 7c426879ab..880d5fb864 100644 --- a/arangod/Pregel/Algos/EffectiveCloseness/EffectiveCloseness.cpp +++ b/arangod/Pregel/Algos/EffectiveCloseness/EffectiveCloseness.cpp @@ -90,7 +90,7 @@ EffectiveCloseness::createComputation(WorkerConfig const*) const { struct ECGraphFormat : public GraphFormat { const std::string _resultField; - ECGraphFormat(std::string const& result) : _resultField(result) {} + explicit ECGraphFormat(std::string const& result) : _resultField(result) {} size_t estimatedEdgeSize() const override { return 0; }; diff --git a/arangod/Pregel/Algos/EffectiveCloseness/EffectiveCloseness.h b/arangod/Pregel/Algos/EffectiveCloseness/EffectiveCloseness.h index 47fa704953..ea66c64100 100644 --- a/arangod/Pregel/Algos/EffectiveCloseness/EffectiveCloseness.h +++ b/arangod/Pregel/Algos/EffectiveCloseness/EffectiveCloseness.h @@ -33,7 +33,7 @@ namespace algos { /// Effective Closeness struct EffectiveCloseness : public SimpleAlgorithm { - EffectiveCloseness(VPackSlice params) + explicit EffectiveCloseness(VPackSlice params) : SimpleAlgorithm("EffectiveCloseness", params) {} GraphFormat* inputFormat() const override; diff --git a/arangod/Pregel/Algos/HITS.cpp b/arangod/Pregel/Algos/HITS.cpp index 0861405adc..ae97f48ec1 100644 --- a/arangod/Pregel/Algos/HITS.cpp +++ b/arangod/Pregel/Algos/HITS.cpp @@ -103,7 +103,7 @@ HITS::createComputation(WorkerConfig const* config) const { struct HITSGraphFormat : public GraphFormat { const std::string _resultField; - HITSGraphFormat(std::string const& result) : _resultField(result) {} + explicit HITSGraphFormat(std::string const& result) : _resultField(result) {} size_t estimatedEdgeSize() const override { return 0; }; diff --git a/arangod/Pregel/Algos/HITS.h b/arangod/Pregel/Algos/HITS.h index c9a262aa0a..7cd048bb4a 100644 --- a/arangod/Pregel/Algos/HITS.h +++ b/arangod/Pregel/Algos/HITS.h @@ -46,7 +46,7 @@ namespace algos { struct HITS : public SimpleAlgorithm> { public: - HITS(VPackSlice userParams) + explicit HITS(VPackSlice userParams) : SimpleAlgorithm>("HITS", userParams) {} diff --git a/arangod/Pregel/Algos/LabelPropagation.cpp b/arangod/Pregel/Algos/LabelPropagation.cpp index 6b40931a9d..23e84f0533 100644 --- a/arangod/Pregel/Algos/LabelPropagation.cpp +++ b/arangod/Pregel/Algos/LabelPropagation.cpp @@ -107,7 +107,7 @@ struct LPGraphFormat : public GraphFormat { std::string _resultField; uint64_t vertexIdRange = 0; - LPGraphFormat(std::string const& result) : _resultField(result) {} + explicit LPGraphFormat(std::string const& result) : _resultField(result) {} size_t estimatedVertexSize() const override { return sizeof(LPValue); }; size_t estimatedEdgeSize() const override { return 0; }; diff --git a/arangod/Pregel/Algos/LabelPropagation.h b/arangod/Pregel/Algos/LabelPropagation.h index 174fa4ed82..650a3d6a1c 100644 --- a/arangod/Pregel/Algos/LabelPropagation.h +++ b/arangod/Pregel/Algos/LabelPropagation.h @@ -40,7 +40,7 @@ namespace algos { /// maximum superstep number. struct LabelPropagation : public SimpleAlgorithm { public: - LabelPropagation(VPackSlice userParams) + explicit LabelPropagation(VPackSlice userParams) : SimpleAlgorithm("LabelPropagation", userParams) {} diff --git a/arangod/Pregel/Algos/LineRank.h b/arangod/Pregel/Algos/LineRank.h index 90e5509291..2a8cd1bcf8 100644 --- a/arangod/Pregel/Algos/LineRank.h +++ b/arangod/Pregel/Algos/LineRank.h @@ -39,7 +39,7 @@ namespace algos { /// github.com/JananiC/NetworkCentralities/blob/master/src/main/java/linerank/LineRank.java struct LineRank : public SimpleAlgorithm { public: - LineRank(arangodb::velocypack::Slice params); + explicit LineRank(arangodb::velocypack::Slice params); GraphFormat* inputFormat() const override { return new VertexGraphFormat(_resultField, -1.0); diff --git a/arangod/Pregel/Algos/PageRank.h b/arangod/Pregel/Algos/PageRank.h index f3ecda8886..69611a8c90 100644 --- a/arangod/Pregel/Algos/PageRank.h +++ b/arangod/Pregel/Algos/PageRank.h @@ -34,7 +34,7 @@ namespace algos { struct PageRank : public SimpleAlgorithm { uint64_t _maxGSS = 250; - PageRank(arangodb::velocypack::Slice const& params); + explicit PageRank(arangodb::velocypack::Slice const& params); GraphFormat* inputFormat() const override { return new VertexGraphFormat(_resultField, 0); diff --git a/arangod/Pregel/Algos/RecoveringPageRank.cpp b/arangod/Pregel/Algos/RecoveringPageRank.cpp index cfb4211d4c..86b20c9dce 100644 --- a/arangod/Pregel/Algos/RecoveringPageRank.cpp +++ b/arangod/Pregel/Algos/RecoveringPageRank.cpp @@ -119,7 +119,7 @@ VertexCompensation* RecoveringPageRank::createCompensation( struct RPRMasterContext : public MasterContext { float _threshold; - RPRMasterContext(VPackSlice params) { + explicit RPRMasterContext(VPackSlice params) { VPackSlice t = params.get("convergenceThreshold"); _threshold = t.isNumber() ? t.getNumber() : EPS; }; diff --git a/arangod/Pregel/Algos/RecoveringPageRank.h b/arangod/Pregel/Algos/RecoveringPageRank.h index 0a149df2bc..a54bd6960d 100644 --- a/arangod/Pregel/Algos/RecoveringPageRank.h +++ b/arangod/Pregel/Algos/RecoveringPageRank.h @@ -32,7 +32,7 @@ namespace algos { /// PageRank struct RecoveringPageRank : public SimpleAlgorithm { - RecoveringPageRank(arangodb::velocypack::Slice params) + explicit RecoveringPageRank(arangodb::velocypack::Slice params) : SimpleAlgorithm("PageRank", params) {} bool supportsCompensation() const override { return true; } diff --git a/arangod/Pregel/Algos/SCC.cpp b/arangod/Pregel/Algos/SCC.cpp index 7342d1d41c..3a1447f4a9 100644 --- a/arangod/Pregel/Algos/SCC.cpp +++ b/arangod/Pregel/Algos/SCC.cpp @@ -148,7 +148,7 @@ struct SCCGraphFormat : public GraphFormat { const std::string _resultField; uint64_t vertexIdRange = 0; - SCCGraphFormat(std::string const& result) : _resultField(result) {} + explicit SCCGraphFormat(std::string const& result) : _resultField(result) {} void willLoadVertices(uint64_t count) override { // if we aren't running in a cluster it doesn't matter diff --git a/arangod/Pregel/Algos/SCC.h b/arangod/Pregel/Algos/SCC.h index 178620a4fa..e1898fcf18 100644 --- a/arangod/Pregel/Algos/SCC.h +++ b/arangod/Pregel/Algos/SCC.h @@ -46,7 +46,7 @@ namespace algos { struct SCC : public SimpleAlgorithm> { public: - SCC(VPackSlice userParams) + explicit SCC(VPackSlice userParams) : SimpleAlgorithm>( "SCC", userParams) {} diff --git a/arangod/Pregel/Algos/SSSP.h b/arangod/Pregel/Algos/SSSP.h index b7df507f42..caa7099177 100644 --- a/arangod/Pregel/Algos/SSSP.h +++ b/arangod/Pregel/Algos/SSSP.h @@ -36,7 +36,7 @@ class SSSPAlgorithm : public Algorithm { std::string _sourceDocumentId, _resultField = "result"; public: - SSSPAlgorithm(VPackSlice userParams) : Algorithm("SSSP") { + explicit SSSPAlgorithm(VPackSlice userParams) : Algorithm("SSSP") { if (!userParams.isObject() || !userParams.hasKey("source")) { THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, "You need to specify the source document id"); diff --git a/arangod/Pregel/Algos/ShortestPath.cpp b/arangod/Pregel/Algos/ShortestPath.cpp index b05461794b..beca094993 100644 --- a/arangod/Pregel/Algos/ShortestPath.cpp +++ b/arangod/Pregel/Algos/ShortestPath.cpp @@ -37,7 +37,7 @@ static std::string const spUpperPathBound = "bound"; struct SPComputation : public VertexComputation { PregelID _target; - SPComputation(PregelID const& target) : _target(target) {} + explicit SPComputation(PregelID const& target) : _target(target) {} void compute(MessageIterator const& messages) override { int64_t current = vertexData(); for (const int64_t* msg : messages) { diff --git a/arangod/Pregel/IncomingCache.h b/arangod/Pregel/IncomingCache.h index 1cedfa3674..fda288f858 100644 --- a/arangod/Pregel/IncomingCache.h +++ b/arangod/Pregel/IncomingCache.h @@ -53,7 +53,7 @@ class InCache { /// Initialize format and mutex map. /// @param config can be null if you don't want locks - InCache(MessageFormat const* format); + explicit InCache(MessageFormat const* format); virtual void _set(PregelShard shard, PregelKey const& vertexId, M const& data) = 0; diff --git a/arangod/Pregel/ThreadPool.h b/arangod/Pregel/ThreadPool.h index c161dc5df8..cbf1a8fa64 100644 --- a/arangod/Pregel/ThreadPool.h +++ b/arangod/Pregel/ThreadPool.h @@ -95,7 +95,7 @@ class WorkerThread : public arangodb::Thread { WorkerThread(WorkerThread const&) = delete; WorkerThread operator=(WorkerThread const&) = delete; - WorkerThread(ThreadPool* pool) + explicit WorkerThread(ThreadPool* pool) : Thread(pool->name()), _pool(pool), _status(0) {} ~WorkerThread() {