From 9f5ab2baca3f52c1ed35ac4cabaaa733d1a2b0e5 Mon Sep 17 00:00:00 2001 From: ullingerc Date: Sun, 24 Nov 2024 22:01:07 +0100 Subject: [PATCH] const correctness --- src/engine/SpatialJoin.h | 4 +++- src/parser/MagicServiceQuery.cpp | 6 +++--- src/parser/MagicServiceQuery.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/engine/SpatialJoin.h b/src/engine/SpatialJoin.h index 22f7ae505b..902b422e22 100644 --- a/src/engine/SpatialJoin.h +++ b/src/engine/SpatialJoin.h @@ -126,7 +126,9 @@ class SpatialJoin : public Operation { // purposes std::optional getMaxResults() const; - void selectAlgorithm(SpatialJoinAlgorithm algo) { config_->algo_ = algo; } + void selectAlgorithm(SpatialJoinAlgorithm algo) const { + config_->algo_ = algo; + } std::pair onlyForTestingGetTask() const { return std::pair{getMaxDist().value_or(-1), getMaxResults().value_or(-1)}; diff --git a/src/parser/MagicServiceQuery.cpp b/src/parser/MagicServiceQuery.cpp index c91426ee0c..23a0cb43dd 100644 --- a/src/parser/MagicServiceQuery.cpp +++ b/src/parser/MagicServiceQuery.cpp @@ -42,9 +42,9 @@ Variable MagicServiceQuery::getVariable(std::string_view parameter, }; // ____________________________________________________________________________ -void MagicServiceQuery::setVariable(std::string_view parameter, - const TripleComponent& object, - std::optional& existingValue) { +void MagicServiceQuery::setVariable( + std::string_view parameter, const TripleComponent& object, + std::optional& existingValue) const { auto variable = getVariable(parameter, object); if (existingValue.has_value()) { diff --git a/src/parser/MagicServiceQuery.h b/src/parser/MagicServiceQuery.h index ccf2cc7f43..c2670fe582 100644 --- a/src/parser/MagicServiceQuery.h +++ b/src/parser/MagicServiceQuery.h @@ -64,7 +64,7 @@ struct MagicServiceQuery { const TripleComponent& object) const; void setVariable(std::string_view parameter, const TripleComponent& object, - std::optional& existingValue); + std::optional& 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.