Skip to content

Commit a8284af

Browse files
committed
fix: make Coordinate2D::withHeight const
1 parent 7a36531 commit a8284af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/mcpp/util.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct Coordinate2D {
142142
* @param coord The Coordinate2D object.
143143
* @param y The y value.
144144
*/
145-
constexpr Coordinate withHeight(int y);
145+
constexpr Coordinate withHeight(int y) const;
146146

147147
/**
148148
* @brief Adds two Coordinate2D objects.
@@ -201,7 +201,7 @@ struct Coordinate2D {
201201
int z;
202202
};
203203

204-
constexpr Coordinate Coordinate2D::withHeight(int y) {
204+
constexpr Coordinate Coordinate2D::withHeight(int y) const {
205205
return Coordinate(this->x, y, this->z);
206206
}
207207

0 commit comments

Comments
 (0)