aboutsummaryrefslogtreecommitdiff
path: root/Source/Python/WarpXWrappers.cpp
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2019-12-11 17:47:47 -0800
committerGravatar GitHub <noreply@github.com> 2019-12-11 17:47:47 -0800
commit579f8578759c2927615cf6f972d0e604403e5e32 (patch)
treeacd41600e5e19c719d5e2d53fcbdbf15900b066d /Source/Python/WarpXWrappers.cpp
parent84892de1590e0d856cbe19b9e269db8cae8ac9a2 (diff)
parent32dd2b40d2634e0dc4022674143c79f217143148 (diff)
downloadWarpX-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.cpp5
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