Skip to content

Commit

Permalink
Remove unnecessary casts
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Apr 14, 2024
1 parent dabbff4 commit 794f7e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tinyexpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ namespace te_builtins
}

const uint32_t intVal{ static_cast<uint32_t>(val) };
const decltype(intVal) result{ static_cast<decltype(intVal)>(~intVal) };
const decltype(intVal) result{ ~intVal };
return static_cast<te_type>(result);
}

Expand All @@ -813,7 +813,7 @@ namespace te_builtins
}

const uint64_t intVal{ static_cast<uint64_t>(val) };
const decltype(intVal) result{ static_cast<decltype(intVal)>(~intVal) };
const decltype(intVal) result{ ~intVal };
return static_cast<te_type>(result);
}

Expand Down

0 comments on commit 794f7e3

Please sign in to comment.