Skip to content

Commit c3c051e

Browse files
committed
Fix shadowed function and class/struct friend declaration warnings
1 parent 835e062 commit c3c051e

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/iceberg/expression/projections.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ICEBERG_EXPORT ProjectionEvaluator {
4343
Result<std::shared_ptr<Expression>> Project(const std::shared_ptr<Expression>& expr);
4444

4545
private:
46-
friend class Projections;
46+
friend struct Projections;
4747

4848
/// \brief Create a ProjectionEvaluator.
4949
///

src/iceberg/schema.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ std::string Schema::ToString() const {
150150
return repr;
151151
}
152152

153-
bool Schema::Equals(const Schema& other) const {
153+
bool Schema::EqualsSchema(const Schema& other) const {
154154
return schema_id_ == other.schema_id_ && fields_ == other.fields_ &&
155155
identifier_field_ids_ == other.identifier_field_ids_;
156156
}

src/iceberg/schema.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,13 @@ class ICEBERG_EXPORT Schema : public StructType {
184184
/// \return Error status if the schema is invalid.
185185
Status Validate(int32_t format_version) const;
186186

187-
friend bool operator==(const Schema& lhs, const Schema& rhs) { return lhs.Equals(rhs); }
187+
friend bool operator==(const Schema& lhs, const Schema& rhs) {
188+
return lhs.EqualsSchema(rhs);
189+
}
188190

189191
private:
190192
/// \brief Compare two schemas for equality.
191-
bool Equals(const Schema& other) const;
193+
bool EqualsSchema(const Schema& other) const;
192194

193195
const int32_t schema_id_;
194196
// Field IDs that uniquely identify rows in the table.

0 commit comments

Comments
 (0)