mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
use std::array in IVec (for 0-size handling)
This commit is contained in:
parent
54d59cff1e
commit
7968ae4588
@ -46,7 +46,8 @@ namespace ngcore
|
||||
class IVec
|
||||
{
|
||||
/// data
|
||||
T i[(N>0)?N:1];
|
||||
// T i[(N>0)?N:1];
|
||||
std::array<T,N> i;
|
||||
|
||||
public:
|
||||
///
|
||||
@ -81,7 +82,7 @@ namespace ngcore
|
||||
template <typename ARCHIVE>
|
||||
void DoArchive(ARCHIVE& ar)
|
||||
{
|
||||
ar.Do(i, N);
|
||||
ar.Do(i.begin(), N);
|
||||
}
|
||||
|
||||
template <int N2, typename T2>
|
||||
|
@ -164,7 +164,7 @@ void ng_init_mpi() {
|
||||
imported_mpi4py = true;
|
||||
}
|
||||
PyObject* py_src = src.ptr();
|
||||
auto type = Py_TYPE(py_src);
|
||||
[[maybe_unused]] auto type = Py_TYPE(py_src);
|
||||
if (PyObject_TypeCheck(py_src, &PyMPIComm_Type)) {
|
||||
dst = mpi2ng(*PyMPIComm_Get(py_src));
|
||||
return !PyErr_Occurred();
|
||||
|
Loading…
Reference in New Issue
Block a user