diff --git a/src/plugins/output_gadget_tetmesh.cc b/src/plugins/output_gadget_tetmesh.cc index 396c7ad..94cd969 100644 --- a/src/plugins/output_gadget_tetmesh.cc +++ b/src/plugins/output_gadget_tetmesh.cc @@ -375,7 +375,7 @@ void delete_duplicates( void ) { if( REMOVE_DECORATION_BITS(P[i].Lagrange_ID) != REMOVE_DECORATION_BITS(P[j-1].Lagrange_ID) ) { - memcpy( &P[j], &P[i], sizeof(particle) ); + memcpy( reinterpret_cast(&P[j]), reinterpret_cast(&P[i]), sizeof(particle) ); idmap[ REMOVE_DECORATION_BITS(P[j].Lagrange_ID) ] = j; ++j; }else{ @@ -1124,7 +1124,7 @@ public: if( num_p + newnum_p_per_split > num_p_alloc ) { - P = (particle*) realloc( P, (num_p_alloc+=num_p_realloc_blocksize)*sizeof(particle) ); + P = reinterpret_cast( realloc( reinterpret_cast(P), (num_p_alloc+=num_p_realloc_blocksize)*sizeof(particle) ) ); LOGINFO("reallocated particle buffer. new size = %llu MBytes.", num_p_alloc * sizeof(particle)/1024/1024 ); } split_lagrange_cube( ip );