Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Aug 8, 2024
1 parent e5f88a2 commit b8a66d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/Enum/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ int main (int argc, char* argv[])

ParmParse pp;
{
MyColor color = static_cast<MyColor>(999);
auto color = static_cast<MyColor>(999);
pp.query("color1", color);
amrex::Print() << "color = " << amrex::getEnumNameString(color) << '\n';
AMREX_ALWAYS_ASSERT(color == MyColor::red);
}
{
MyColor color = static_cast<MyColor>(999);
auto color = static_cast<MyColor>(999);
pp.get("color2", color);
amrex::Print() << "color = " << amrex::getEnumNameString(color) << '\n';
AMREX_ALWAYS_ASSERT(color == MyColor::green);
}
{
MyColor color = static_cast<MyColor>(999);
auto color = static_cast<MyColor>(999);
pp.get("color3", color);
amrex::Print() << "color = " << amrex::getEnumNameString(color) << '\n';
AMREX_ALWAYS_ASSERT(color == MyColor::blue);
}
{
MyColor color = static_cast<MyColor>(999);
auto color = static_cast<MyColor>(999);
try {
pp.query("color4", color);
} catch (std::runtime_error const& e) {
Expand All @@ -62,7 +62,7 @@ int main (int argc, char* argv[])
AMREX_ALWAYS_ASSERT(color == static_cast<MyColor>(999));
}
{
MyColor color = static_cast<MyColor>(999);
auto color = static_cast<MyColor>(999);
try {
pp.query("color5", color);
} catch (std::runtime_error const& e) {
Expand Down

0 comments on commit b8a66d1

Please sign in to comment.