Merge pull request #5469 from afabri/Box_intersection_d-array-GF

Box_intersection_d:  Replace built-in array with std::array
This commit is contained in:
Laurent Rineau 2021-03-03 16:39:49 +01:00
commit a9ef9c5aeb
1 changed files with 6 additions and 4 deletions

View File

@ -24,6 +24,7 @@
#include <CGAL/atomic.h>
#include <algorithm>
#include <array>
namespace CGAL {
@ -63,8 +64,9 @@ class Box_d;
template<class NT_, int N>
class Box_d< NT_, N, ID_NONE> {
protected:
NT_ lo[N];
NT_ hi[N];
std::array<NT_,N> lo;
std::array<NT_,N> hi;
public:
typedef NT_ NT;
typedef std::size_t ID;
@ -72,8 +74,8 @@ public:
Box_d() {}
Box_d(bool complete) { init(complete); }
Box_d(NT l[N], NT h[N]) {
std::copy( l, l + N, lo );
std::copy( h, h + N, hi );
std::copy( l, l + N, &lo[0] );
std::copy( h, h + N, &hi[0] );
}
void init (bool complete = false) {
NT inf = box_limits<NT>::inf();