diff options
author | 2021-10-15 10:22:56 -0700 | |
---|---|---|
committer | 2021-10-15 10:22:56 -0700 | |
commit | 56c879d95c5b8752e62508396ffca61ba4b69aff (patch) | |
tree | f878b0cdf64cfe8816f11193a088526d7d357f5a /Source/Utils/WarpXUtil.cpp | |
parent | 6351dca8d6ab4edf648977d9b9adb6c42ff92c2e (diff) | |
download | WarpX-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.cpp | 4 |
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 |