Commit 5f42af1d authored by nagayama15's avatar nagayama15

リファクタリング

parent e24262a4
......@@ -21,19 +21,17 @@ namespace
{
try
{
if constexpr (std::is_unsigned_v<Integer>)
const auto v = [](llvm::StringRef s)
{
const auto v = std::stoull(arg.str());
if (Min <= v && v <= Max)
if constexpr (std::is_unsigned_v<Integer>)
{
val = static_cast<Integer>(v);
return false;
}
return std::stoull(s.str());
}
else
{
const auto v = std::stoll(arg.str());
return std::stoll(s.str());
}
}(arg);
if (Min <= v && v <= Max)
{
......@@ -41,7 +39,6 @@ namespace
return false;
}
}
}
catch ([[maybe_unused]] const std::exception& e)
{
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment