From a3d3457bfd5ac15142e63dd87fc3c4d873df805b Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sun, 25 May 2025 15:31:08 -0700 Subject: [PATCH] Fix data loading of manually selected Lensfun lens Remove requirement that the lens mount matches the camera mount. This allows adapted lenses to work. Matching the lens mount isn't even necessary because the make and model names together should be unique. --- rtengine/rtlensfun.cc | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 8bda820a9..47b0d6172 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -30,16 +30,6 @@ namespace { -bool isCStringIn(const char *str, const char *const *list) -{ - for (auto element_ptr = list; *element_ptr; element_ptr++) { - if (!strcmp(str, *element_ptr)) { - return true; - } - } - return false; -} - bool isNextLensCropFactorBetter(const lfLens *current_lens, const lfCamera *camera, float next_lens_crop_factor) { if (!current_lens) { @@ -75,8 +65,7 @@ bool isNextLensCropFactorBetter(const lfLens *current_lens, const lfCamera *came bool isNextLensBetter(const lfCamera *camera, const lfLens *current_lens, const lfLens &next_lens, const Glib::ustring &lens_name, const Glib::ustring &next_lens_name) { return isNextLensCropFactorBetter(current_lens, camera, next_lens.CropFactor) && - lens_name == next_lens_name && - (!camera || isCStringIn(camera->Mount, next_lens.Mounts)); + lens_name == next_lens_name; } /**