Changeset - r28485:781fef3b0a48
[Not reviewed]
master
0 1 0
Peter Nelson - 11 months ago 2024-01-15 22:49:25
peter1138@openttd.org
Codechange: Make geometry methods constexpr.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/core/geometry_type.hpp
Show inline comments
 
@@ -54,19 +54,19 @@ struct RectPadding {
 
	static const RectPadding zero;
 

	
 
	/**
 
	 * 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{};
 

	
 
/** Specification of a rectangle with absolute coordinates of all edges */
 
struct Rect {
0 comments (0 inline, 0 general)