Compare commits

..

No commits in common. "88905609f54f98a344bd7f9cc8a9fdd5d57ce038" and "4d594e94633c23f5b7f6636ce32ada0b72dd078f" have entirely different histories.

5 changed files with 4 additions and 40 deletions

View File

@ -1,28 +0,0 @@
name: check-formatting
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
types: [opened, synchronize, reopened]
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2.0.2
with:
version: "17.0"
- name: Test formatting for all files
working-directory: ${{ github.workspace }}
run: |
export CLANG_FORMAT_BIN="${LLVM_PATH}/bin/clang-format"
./scripts/check-format.sh

2
deps/GSL vendored

@ -1 +1 @@
Subproject commit ddae9d72b6bd5fe58bc5c54e8c513fca67c833f6 Subproject commit 87f9d768866548b5b86e72be66c60c5abd4d9b37

2
deps/libtomcrypt vendored

@ -1 +1 @@
Subproject commit 17642547e4b18a6ba58b1705527500b003caca8f Subproject commit cacfc2dc047518a90900638f1417a8544ac1e555

View File

@ -1,8 +0,0 @@
#!/bin/bash
# Go to repository root
cd "$(dirname "$0")/.." || exit 2
CLANG_FORMAT_BIN="${CLANG_FORMAT_BIN:-clang-format}"
find ./src -iname '*.hpp' -o -iname '*.cpp' | xargs $CLANG_FORMAT_BIN -Werror -ferror-limit=1 --dry-run

View File

@ -19,8 +19,8 @@ public:
template <typename T> static T* get() { template <typename T> static T* get() {
for (const auto& component_ : get_components()) { for (const auto& component_ : get_components()) {
if (auto c = dynamic_cast<T*>(component_.get())) { if (typeid(*component_.get()) == typeid(T)) {
return c; return reinterpret_cast<T*>(component_.get());
} }
} }