aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXUtil.cpp
diff options
context:
space:
mode:
authorGravatar David Grote <grote1@llnl.gov> 2021-10-15 10:22:56 -0700
committerGravatar GitHub <noreply@github.com> 2021-10-15 10:22:56 -0700
commit56c879d95c5b8752e62508396ffca61ba4b69aff (patch)
treef878b0cdf64cfe8816f11193a088526d7d357f5a /Source/Utils/WarpXUtil.cpp
parent6351dca8d6ab4edf648977d9b9adb6c42ff92c2e (diff)
downloadWarpX-56c879d95c5b8752e62508396ffca61ba4b69aff.tar.gz
WarpX-56c879d95c5b8752e62508396ffca61ba4b69aff.tar.zst
WarpX-56c879d95c5b8752e62508396ffca61ba4b69aff.zip
Made explicit several casts (#2431)
Diffstat (limited to 'Source/Utils/WarpXUtil.cpp')
-rw-r--r--Source/Utils/WarpXUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Utils/WarpXUtil.cpp b/Source/Utils/WarpXUtil.cpp
index 64b30a9b1..a96e62748 100644
--- a/Source/Utils/WarpXUtil.cpp
+++ b/Source/Utils/WarpXUtil.cpp
@@ -393,7 +393,7 @@ queryWithParser (const amrex::ParmParse& a_pp, char const * const str, float& va
// If so, create a parser object and apply it to the value provided by the user.
std::string str_val;
Store_parserString(a_pp, str, str_val);
- val = parseStringtoReal(str_val);
+ val = static_cast<float>(parseStringtoReal(str_val));
}
// return the same output as amrex::ParmParse::query
return is_specified;
@@ -405,7 +405,7 @@ getWithParser (const amrex::ParmParse& a_pp, char const * const str, float& val)
// If so, create a parser object and apply it to the value provided by the user.
std::string str_val;
Store_parserString(a_pp, str, str_val);
- val = parseStringtoReal(str_val);
+ val = static_cast<float>(parseStringtoReal(str_val));
}
int