From 43ee3640e7f11ecaed7a243d98f4fd98976a8a9c Mon Sep 17 00:00:00 2001 From: silverqx Date: Thu, 4 Aug 2022 12:23:26 +0200 Subject: [PATCH] fixed warning, variable shadowing --- include/orm/tiny/relations/belongsto.hpp | 4 ++-- include/orm/tiny/relations/relation.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/orm/tiny/relations/belongsto.hpp b/include/orm/tiny/relations/belongsto.hpp index 944dffb73..330675a8a 100644 --- a/include/orm/tiny/relations/belongsto.hpp +++ b/include/orm/tiny/relations/belongsto.hpp @@ -329,9 +329,9 @@ namespace Orm::Tiny::Relations keys << std::move(value); } - return keys |= ranges::actions::sort(ranges::less {}, [](const auto &key) + return keys |= ranges::actions::sort(ranges::less {}, [](const auto &key_) { - return key.template value(); + return key_.template value(); }) | ranges::actions::unique; } diff --git a/include/orm/tiny/relations/relation.hpp b/include/orm/tiny/relations/relation.hpp index 24df715ea..ef9d04219 100644 --- a/include/orm/tiny/relations/relation.hpp +++ b/include/orm/tiny/relations/relation.hpp @@ -329,9 +329,9 @@ namespace Relations keys.append(key.isEmpty() ? model.getKey() : model.getAttribute(key)); - return keys |= ranges::actions::sort(ranges::less {}, [](const auto &key) + return keys |= ranges::actions::sort(ranges::less {}, [](const auto &key_) { - return key.template value(); + return key_.template value(); }) | ranges::actions::unique; }