region: remove two-scalar constructor
two-scalar constructor is too similar to extent and point constructors leading to unexpected initialisation problems.
This commit is contained in:
parent
0211ed5b37
commit
426fc1c848
15
region.cpp
15
region.cpp
@ -65,15 +65,6 @@ util::region<S,T>::region (std::array<T,S*2> args)
|
|||||||
std::copy (&args[S], &args[S*2], e.data);
|
std::copy (&args[S], &args[S*2], e.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
template <size_t S, typename T>
|
|
||||||
util::region<S,T>::region (position_type _p,
|
|
||||||
size_type _e):
|
|
||||||
region (point_t {_p}, extent_t {_e})
|
|
||||||
{
|
|
||||||
debug::sanity (*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
@ -361,14 +352,14 @@ util::region<S,T>::operator== (region rhs) const
|
|||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
const util::region<S,T>
|
const util::region<S,T>
|
||||||
util::region<S,T>::MAX (
|
util::region<S,T>::MAX (
|
||||||
std::numeric_limits<T>::lowest () / 2,
|
util::point<S,T> {std::numeric_limits<T>::lowest () / 2},
|
||||||
std::numeric_limits<T>::max ()
|
util::extent<S,T> {std::numeric_limits<T>::max ()}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
const util::region<S,T>
|
const util::region<S,T>
|
||||||
util::region<S,T>::UNIT ({0}, {1});
|
util::region<S,T>::UNIT (util::point<S,T>{0}, util::extent<S,T>{1});
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -69,7 +69,6 @@ namespace util {
|
|||||||
region (point_t, extent_t);
|
region (point_t, extent_t);
|
||||||
region (point_t, point_t);
|
region (point_t, point_t);
|
||||||
region (std::array<T,S*2>);
|
region (std::array<T,S*2>);
|
||||||
region (position_type, size_type);
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
size_type area (void) const;
|
size_type area (void) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user