region: make area and diameter constexpr
This commit is contained in:
parent
89a4641c33
commit
426a3a3fde
18
region.cpp
18
region.cpp
@ -53,24 +53,6 @@ cruft::region<S,T>::region (point_t _a,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
template <size_t S, typename T>
|
|
||||||
T
|
|
||||||
cruft::region<S,T>::area (void) const
|
|
||||||
{
|
|
||||||
return e.area ();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
template <size_t S, typename T>
|
|
||||||
T
|
|
||||||
cruft::region<S,T>::diameter (void) const
|
|
||||||
{
|
|
||||||
return e.diameter ();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
typename cruft::region<S,T>::extent_t
|
typename cruft::region<S,T>::extent_t
|
||||||
|
@ -52,8 +52,8 @@ namespace cruft {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
T area (void) const;
|
constexpr T area (void) const { return e.area (); }
|
||||||
T diameter (void) const;
|
constexpr T diameter (void) const { return e.diameter (); }
|
||||||
extent_t magnitude (void) const;
|
extent_t magnitude (void) const;
|
||||||
extent_t magnitude (extent_t);
|
extent_t magnitude (extent_t);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user