mirror of https://gitee.com/bigwinds/arangodb
cppcheck
This commit is contained in:
parent
9a724cd5a6
commit
785beaa625
|
@ -52,17 +52,14 @@ bool checkPathVariableAccessFeasible (CalculationNode const* cn,
|
|||
|
||||
node->findVariableAccess(currentPath, paths, var);
|
||||
|
||||
for (auto onePath : paths) {
|
||||
for (auto const& onePath : paths) {
|
||||
size_t len = onePath.size();
|
||||
bool isEdgeAccess = false;
|
||||
bool isVertexAccess = false;
|
||||
|
||||
if (onePath[len - 2]->type == NODE_TYPE_ATTRIBUTE_ACCESS) {
|
||||
isEdgeAccess = strcmp(onePath[len - 2]->getStringValue(), "edges") == 0;
|
||||
isVertexAccess = strcmp(onePath[len - 2]->getStringValue(), "vertices") == 0;
|
||||
|
||||
if (!isEdgeAccess && ! isVertexAccess) {
|
||||
|
||||
if (!isEdgeAccess && strcmp(onePath[len - 2]->getStringValue(), "vertices") != 0) {
|
||||
/* We can't catch all cases in which this error would occur, so we don't throw here.
|
||||
std::string message("TRAVERSAL: path only knows 'edges' and 'vertices', not ");
|
||||
message += onePath[len - 2]->getStringValue();
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace triagens {
|
|||
|
||||
public:
|
||||
|
||||
VertexGetter (ClusterTraverser* traverser)
|
||||
explicit VertexGetter (ClusterTraverser* traverser)
|
||||
: _traverser(traverser) {
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ namespace triagens {
|
|||
|
||||
public:
|
||||
|
||||
EdgeGetter (ClusterTraverser* traverser)
|
||||
explicit EdgeGetter (ClusterTraverser* traverser)
|
||||
: _traverser(traverser),
|
||||
_continueConst(1) {
|
||||
}
|
||||
|
|
|
@ -195,24 +195,24 @@ namespace triagens {
|
|||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- public functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
public:
|
||||
|
||||
SingleServerTraversalPath (
|
||||
const triagens::basics::EnumeratedPath<EdgeInfo, VertexId>& path
|
||||
) : _path(path) {
|
||||
explicit SingleServerTraversalPath (triagens::basics::EnumeratedPath<EdgeInfo, VertexId> const& path)
|
||||
: _path(path) {
|
||||
}
|
||||
|
||||
~SingleServerTraversalPath () {
|
||||
}
|
||||
|
||||
triagens::basics::Json* pathToJson (Transaction*,
|
||||
CollectionNameResolver*) override;
|
||||
triagens::basics::Json* pathToJson (triagens::arango::Transaction*,
|
||||
triagens::arango::CollectionNameResolver*) override;
|
||||
|
||||
triagens::basics::Json* lastEdgeToJson (Transaction*,
|
||||
CollectionNameResolver*) override;
|
||||
triagens::basics::Json* lastEdgeToJson (triagens::arango::Transaction*,
|
||||
triagens::arango::CollectionNameResolver*) override;
|
||||
|
||||
triagens::basics::Json* lastVertexToJson (Transaction*,
|
||||
CollectionNameResolver*) override;
|
||||
triagens::basics::Json* lastVertexToJson (triagens::arango::Transaction*,
|
||||
triagens::arango::CollectionNameResolver*) override;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ namespace triagens {
|
|||
Shape const* _shapes;
|
||||
|
||||
public:
|
||||
LegendReader (char const* l)
|
||||
explicit LegendReader (char const* l)
|
||||
: Shaper(),
|
||||
_legend(l) {
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace triagens {
|
|||
compareTo(nullptr) {
|
||||
}
|
||||
|
||||
TraverserExpression (TRI_json_t const*);
|
||||
explicit TraverserExpression (TRI_json_t const*);
|
||||
|
||||
virtual ~TraverserExpression () {
|
||||
// no need to destroy varAccess here. Its memory is managed via the
|
||||
|
|
Loading…
Reference in New Issue