Skip to content
Snippets Groups Projects
Commit 632e0507 authored by Oliver Sander's avatar Oliver Sander
Browse files

use cast-to-bool to test for shared_ptr validity

[[Imported from SVN: r5748]]
parent 1669228c
No related branches found
No related tags found
No related merge requests found
......@@ -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->());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment