Skip to content

Commit

Permalink
Run clang-tidy on all files
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Nov 14, 2024
1 parent 2ebe30c commit 2a309b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
ln -s build/compile_commands.json
- name: Run clang-tidy
run: |
clang-tidy src/pantab/writer.cpp
clang-tidy src/pantab/reader.cpp
clang-tidy src/pantab/*.*pp --warnings-as-errors='*'
build_wheels:
name: Build wheels on ${{ matrix.os }}
Expand Down
4 changes: 3 additions & 1 deletion src/pantab/numeric_gen.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <array>
#include <cstddef>
#include <utility>
#include <variant>
Expand All @@ -10,7 +11,8 @@
template <std::size_t N> constexpr auto to_integral_variant(std::size_t n) {
return [&]<std::size_t... Is>(std::index_sequence<Is...>) {
using ResType = std::variant<std::integral_constant<std::size_t, Is>...>;
ResType all[] = {ResType{std::integral_constant<std::size_t, Is>{}}...};
std::array<ResType, N> all{
ResType{std::integral_constant<std::size_t, Is>{}}...};
return all[n];
}(std::make_index_sequence<N>());
}

0 comments on commit 2a309b4

Please sign in to comment.