From 54a1cc8a1ea3374e088f0fabae42f0a260eac049 Mon Sep 17 00:00:00 2001 From: Jasem Mutlaq Date: Sat, 4 May 2024 08:21:49 +0300 Subject: [PATCH] Fix compile error --- libs/alignment/InMemoryDatabase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/alignment/InMemoryDatabase.cpp b/libs/alignment/InMemoryDatabase.cpp index 81fd6efda5..ea86892c48 100644 --- a/libs/alignment/InMemoryDatabase.cpp +++ b/libs/alignment/InMemoryDatabase.cpp @@ -28,7 +28,7 @@ InMemoryDatabase::InMemoryDatabase() : DatabaseReferencePositionIsValid(false), bool InMemoryDatabase::CheckForDuplicateSyncPoint(const AlignmentDatabaseEntry &CandidateEntry, double Tolerance) const { - return std::any_of(MySyncPoints.begin(), MySyncPoints.end(), [CandidateEntry, Tolerance](const auto & point) + return std::any_of(MySyncPoints.begin(), MySyncPoints.end(), [&CandidateEntry, Tolerance](const auto & point) { return (((std::abs(point.RightAscension - CandidateEntry.RightAscension) < 24.0 * Tolerance / 100.0) && (std::abs(point.Declination - CandidateEntry.Declination) < 180.0 * Tolerance / 100.0)) || @@ -42,7 +42,7 @@ void InMemoryDatabase::RemoveSyncPoint(const AlignmentDatabaseEntry &CandidateEn double Tolerance) { MySyncPoints.erase(std::remove_if(MySyncPoints.begin(), MySyncPoints.end(), - [CandidateEntry, Tolerance](const auto & point) + [&CandidateEntry, Tolerance](const auto & point) { return (((std::abs(point.RightAscension - CandidateEntry.RightAscension) < 24.0 * Tolerance / 100.0) && (std::abs(point.Declination - CandidateEntry.Declination) < 180.0 * Tolerance / 100.0)) ||