diff options
author | 2019-12-11 17:47:47 -0800 | |
---|---|---|
committer | 2019-12-11 17:47:47 -0800 | |
commit | 579f8578759c2927615cf6f972d0e604403e5e32 (patch) | |
tree | acd41600e5e19c719d5e2d53fcbdbf15900b066d /Source/Python/WarpXWrappers.cpp | |
parent | 84892de1590e0d856cbe19b9e269db8cae8ac9a2 (diff) | |
parent | 32dd2b40d2634e0dc4022674143c79f217143148 (diff) | |
download | WarpX-579f8578759c2927615cf6f972d0e604403e5e32.tar.gz WarpX-579f8578759c2927615cf6f972d0e604403e5e32.tar.zst WarpX-579f8578759c2927615cf6f972d0e604403e5e32.zip |
Merge pull request #565 from lucafedeli88/cleaning_lgtm
[mini-PR] Address C++ issues found by LGTM
Diffstat (limited to 'Source/Python/WarpXWrappers.cpp')
-rw-r--r-- | Source/Python/WarpXWrappers.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Python/WarpXWrappers.cpp b/Source/Python/WarpXWrappers.cpp index be9ec9519..3074b1990 100644 --- a/Source/Python/WarpXWrappers.cpp +++ b/Source/Python/WarpXWrappers.cpp @@ -14,8 +14,9 @@ namespace *num_boxes = mf.local_size(); int shapesize = AMREX_SPACEDIM; if (mf.nComp() > 1) shapesize += 1; - *shapes = (int*) malloc(shapesize * (*num_boxes) * sizeof(int)); - amrex::Real** data = (amrex::Real**) malloc((*num_boxes) * sizeof(amrex::Real*)); + *shapes = static_cast<int*>(malloc(sizeof(int)*shapesize * (*num_boxes))); + auto data = + static_cast<amrex::Real**>(malloc((*num_boxes) * sizeof(amrex::Real*))); #ifdef _OPENMP #pragma omp parallel |