Skip to content

Commit

Permalink
apply sonarcloud suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Qup42 committed Dec 16, 2024
1 parent 8fd406e commit a4f7f33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/index/DeltaTriples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ void to_json(nlohmann::json& j, const DeltaTriplesCount& count) {
}

Check warning on line 200 in src/index/DeltaTriples.cpp

View check run for this annotation

Codecov / codecov/patch

src/index/DeltaTriples.cpp#L196-L200

Added lines #L196 - L200 were not covered by tests

// ____________________________________________________________________________
DeltaTriplesCount DeltaTriplesCount::operator-(
const DeltaTriplesCount& other) const {
return {triplesInserted_ - other.triplesInserted_,
triplesDeleted_ - other.triplesDeleted_};
DeltaTriplesCount operator-(const DeltaTriplesCount& lhs,
const DeltaTriplesCount& rhs) {
return {lhs.triplesInserted_ - rhs.triplesInserted_,
lhs.triplesDeleted_ - rhs.triplesDeleted_};
}

Check warning on line 207 in src/index/DeltaTriples.cpp

View check run for this annotation

Codecov / codecov/patch

src/index/DeltaTriples.cpp#L204-L207

Added lines #L204 - L207 were not covered by tests

// ____________________________________________________________________________
Expand Down
3 changes: 2 additions & 1 deletion src/index/DeltaTriples.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ struct DeltaTriplesCount {
/// library to allow for implicit conversion.
friend void to_json(nlohmann::json& j, const DeltaTriplesCount& count);

DeltaTriplesCount operator-(const DeltaTriplesCount& other) const;
friend DeltaTriplesCount operator-(const DeltaTriplesCount& lhs,
const DeltaTriplesCount& rhs);
};

// A class for maintaining triples that are inserted or deleted after index
Expand Down

0 comments on commit a4f7f33

Please sign in to comment.