diff --git a/dune/common/mpicollectivecommunication.hh b/dune/common/mpicollectivecommunication.hh index fbd5faa0493815a5970d70cbab1eb27a9d0ef23c..873ffdc13d2d4b9f4f23374e3a0d868cd527a98f 100644 --- a/dune/common/mpicollectivecommunication.hh +++ b/dune/common/mpicollectivecommunication.hh @@ -32,7 +32,7 @@ namespace Dune public: static MPI_Datatype get () { - if (type.operator->()==0) + if (!type) { type = shared_ptr<MPI_Datatype>(new MPI_Datatype); MPI_Type_contiguous(sizeof(T),MPI_BYTE,type.operator->()); @@ -86,7 +86,7 @@ namespace Dune public: static MPI_Op get () { - if (op.operator->()==0) + if (!op) { op = shared_ptr<MPI_Op>(new MPI_Op); MPI_Op_create((void (*)(void*, void*, int*, MPI_Datatype*))&operation,true,op.operator->());