diff --git a/src/core/group/group.h b/src/core/group/group.h index 4e7326e..fe036a5 100644 --- a/src/core/group/group.h +++ b/src/core/group/group.h @@ -188,9 +188,9 @@ public: // TODO: add `is_xxx_mirror` interface - [[nodiscard]] Group to_vertical_mirror() const; + [[nodiscard]] constexpr Group to_vertical_mirror() const; - [[nodiscard]] Group to_horizontal_mirror() const; + [[nodiscard]] constexpr Group to_horizontal_mirror() const; private: uint32_t type_id_; diff --git a/src/core/group/internal/group.inl b/src/core/group/internal/group.inl index 31420b7..0e57cfb 100644 --- a/src/core/group/internal/group.inl +++ b/src/core/group/internal/group.inl @@ -24,11 +24,11 @@ constexpr uint32_t Group::flat_id() const { // ----------------------------------------------------------------------------------------- // -Group Group::to_vertical_mirror() const { +constexpr Group Group::to_vertical_mirror() const { return Group::unsafe_create(type_id_, GROUP_MIRROR_V[flat_id()]); } -Group Group::to_horizontal_mirror() const { +constexpr Group Group::to_horizontal_mirror() const { return Group::unsafe_create(type_id_, GROUP_MIRROR_H[flat_id()]); }