From a5b6e17556da19fd45939d2842124e65da6772bb Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 15 Jan 2024 22:49:25 +0000 Subject: [PATCH] Codechange: Make geometry methods constexpr. --- src/core/geometry_type.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/geometry_type.hpp b/src/core/geometry_type.hpp index 2c1f91abe4..98995f4797 100644 --- a/src/core/geometry_type.hpp +++ b/src/core/geometry_type.hpp @@ -57,13 +57,13 @@ struct RectPadding { * Get total horizontal padding of RectPadding. * @return total horizontal padding. */ - inline uint Horizontal() const { return this->left + this->right; } + constexpr uint Horizontal() const { return this->left + this->right; } /** * Get total vertical padding of RectPadding. * @return total vertical padding. */ - inline uint Vertical() const { return this->top + this->bottom; } + constexpr uint Vertical() const { return this->top + this->bottom; } }; inline const RectPadding RectPadding::zero{};