Skip to content

Commit

Permalink
const correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
ullingerc committed Nov 24, 2024
1 parent fb197e4 commit 9f5ab2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/engine/SpatialJoin.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ class SpatialJoin : public Operation {
// purposes
std::optional<size_t> getMaxResults() const;

void selectAlgorithm(SpatialJoinAlgorithm algo) { config_->algo_ = algo; }
void selectAlgorithm(SpatialJoinAlgorithm algo) const {
config_->algo_ = algo;
}

std::pair<size_t, size_t> onlyForTestingGetTask() const {
return std::pair{getMaxDist().value_or(-1), getMaxResults().value_or(-1)};
Expand Down
6 changes: 3 additions & 3 deletions src/parser/MagicServiceQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ Variable MagicServiceQuery::getVariable(std::string_view parameter,
};

// ____________________________________________________________________________
void MagicServiceQuery::setVariable(std::string_view parameter,
const TripleComponent& object,
std::optional<Variable>& existingValue) {
void MagicServiceQuery::setVariable(
std::string_view parameter, const TripleComponent& object,
std::optional<Variable>& existingValue) const {
auto variable = getVariable(parameter, object);

if (existingValue.has_value()) {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/MagicServiceQuery.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct MagicServiceQuery {
const TripleComponent& object) const;

void setVariable(std::string_view parameter, const TripleComponent& object,
std::optional<Variable>& existingValue);
std::optional<Variable>& existingValue) const;

// Utility function to extract the name of a parameter in a magic service
// configuration. That is, remove the magic IRI predicate if applicable.
Expand Down

0 comments on commit 9f5ab2b

Please sign in to comment.