Skip to content

Commit

Permalink
sonarqube
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan24680 committed Jan 20, 2025
1 parent c1dc963 commit c5284ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/engine/SpatialJoinAlgorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Id SpatialJoinAlgorithms::computeDist(const IdTable* idTableLeft,
// gets printed at another place and the point/area just gets skipped
return std::nullopt;
}
if (useMidpointForAreas) {
if (useMidpointForAreas_) {
Point p = calculateMidpointOfBox(areaBox);
return GeoPoint(p.get<1>(), p.get<0>());
} else {
Expand Down Expand Up @@ -300,7 +300,8 @@ std::vector<Box> SpatialJoinAlgorithms::computeBoundingBox(
auto archaversine = [](double theta) { return std::acos(1 - 2 * theta); };

// safety buffer for numerical inaccuracies
double maxDistInMetersBuffer = maxDist.value() + additionalDist;
double maxDistInMetersBuffer =
static_cast<double>(maxDist.value()) + additionalDist;
if (maxDistInMetersBuffer < 10) {
maxDistInMetersBuffer = 10;
} else if (static_cast<double>(maxDist.value()) <
Expand Down Expand Up @@ -545,9 +546,8 @@ Result SpatialJoinAlgorithms::BoundingBoxAlgorithm() {
std::string warning =
"The input to a spatial join contained at least one element, "
"that is not a point or polygon geometry and is thus skipped. Note "
"that "
"QLever currently only accepts point or polygon geometries for the "
"spatial joins";
"that QLever currently only accepts point or polygon geometries for "
"the spatial joins";
AD_LOG_WARN << warning << std::endl;
alreadyWarned = true;
if (spatialJoin.has_value()) {
Expand Down
2 changes: 1 addition & 1 deletion src/engine/SpatialJoinAlgorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class SpatialJoinAlgorithms {

// if the distance calculation should be approximated, by the midpoint of
// the area
bool useMidpointForAreas = true;
bool useMidpointForAreas_ = true;

// circumference in meters at the equator (max) and the pole (min) (as the
// earth is not exactly a sphere the circumference is different. Note that
Expand Down

0 comments on commit c5284ef

Please sign in to comment.