From 7d48a3f07315c0fa43818209a9e530ce3796b221 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Thu, 16 Nov 2023 17:07:29 +0000 Subject: [PATCH] Codechange: Move RectPadding::zero definition to header. (#11461) This potentially allows better inlining/optimization. --- src/core/geometry_func.cpp | 2 -- src/core/geometry_type.hpp | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/geometry_func.cpp b/src/core/geometry_func.cpp index 3dd680347c..dccef72ecc 100644 --- a/src/core/geometry_func.cpp +++ b/src/core/geometry_func.cpp @@ -48,5 +48,3 @@ Rect BoundingRect(const Rect &r1, const Rect &r2) return r; } - -const RectPadding RectPadding::zero = {0, 0, 0, 0}; diff --git a/src/core/geometry_type.hpp b/src/core/geometry_type.hpp index 17fba0c833..323cadc702 100644 --- a/src/core/geometry_type.hpp +++ b/src/core/geometry_type.hpp @@ -65,6 +65,8 @@ struct RectPadding { inline uint Vertical() const { return this->top + this->bottom; } }; +inline const RectPadding RectPadding::zero{}; + /** Specification of a rectangle with absolute coordinates of all edges */ struct Rect { int left;