From 9df8ed4c1e0c5b537460cda9d669034dca4431b4 Mon Sep 17 00:00:00 2001 From: silverqx Date: Thu, 4 Aug 2022 12:18:35 +0200 Subject: [PATCH] fixed warning type shadowing --- .../concerns/interactswithpivottable.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/orm/tiny/relations/concerns/interactswithpivottable.hpp b/include/orm/tiny/relations/concerns/interactswithpivottable.hpp index daf772374..9267092dd 100644 --- a/include/orm/tiny/relations/concerns/interactswithpivottable.hpp +++ b/include/orm/tiny/relations/concerns/interactswithpivottable.hpp @@ -57,7 +57,7 @@ namespace Concerns public: /*! Alias for the current BelongsToMany type (for shorter name). */ - using BelongsToMany = BelongsToMany; + using BelongsToManyType = BelongsToMany; /*! Alias for the parent model's key type (for shorter name). */ using ParentKeyType = typename BaseModel::KeyType; /*! Alias for the related model's key type (for shorter name). */ @@ -77,13 +77,13 @@ namespace Concerns InteractsWithPivotTable &operator=(InteractsWithPivotTable &&) = delete; /*! Set the columns on the pivot table to retrieve. */ - BelongsToMany &withPivot(const QStringList &columns); + BelongsToManyType &withPivot(const QStringList &columns); /*! Set the columns on the pivot table to retrieve. */ - inline BelongsToMany &withPivot(const QString &column); + inline BelongsToManyType &withPivot(const QString &column); /*! Set the columns on the pivot table to retrieve. */ - BelongsToMany &withPivot(QStringList &&columns); + BelongsToManyType &withPivot(QStringList &&columns); /*! Set the columns on the pivot table to retrieve. */ - inline BelongsToMany &withPivot(QString &&column); + inline BelongsToManyType &withPivot(QString &&column); /*! Determine whether the given column is defined as a pivot column. */ inline bool hasPivotColumn(const QString &column) const; @@ -293,9 +293,9 @@ namespace Concerns /* InteractsWithPivotTable */ /*! Static cast *this to the Relation & derived type. */ - inline BelongsToMany &relation(); + inline BelongsToManyType &relation(); /*! Static cast *this to the Relation & derived type, const version. */ - inline const BelongsToMany &relation() const; + inline const BelongsToManyType &relation() const; }; /* public */ @@ -1187,7 +1187,7 @@ namespace Concerns InteractsWithPivotTable::relation() { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-static-cast-downcast) - return static_cast(*this); + return static_cast(*this); } template @@ -1195,7 +1195,7 @@ namespace Concerns InteractsWithPivotTable::relation() const { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-static-cast-downcast) - return static_cast(*this); + return static_cast(*this); } } // namespace Concerns