Skip to content

Commit

Permalink
Fix: Various clang-tidy warnings
Browse files Browse the repository at this point in the history
Else after return, usage after move, redundant casts, unused parameters.
  • Loading branch information
spnda committed Apr 28, 2024
1 parent e38682b commit 4272301
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 113 deletions.
3 changes: 2 additions & 1 deletion include/fastgltf/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <memory>
Expand Down Expand Up @@ -110,7 +111,7 @@ namespace fastgltf {
#if FASTGLTF_HAS_CONCEPTS
requires std::is_enum_v<T>
#endif
[[nodiscard]] constexpr std::underlying_type_t<T> to_underlying(T t) noexcept {
[[nodiscard, msvc::intrinsic]] constexpr std::underlying_type_t<T> to_underlying(T t) noexcept {
#if !FASTGLTF_HAS_CONCEPTS
static_assert(std::is_enum_v<T>, "to_underlying only works with enum types.");
#endif
Expand Down
Loading

0 comments on commit 4272301

Please sign in to comment.