Skip to content

Commit 59a3dbb

Browse files
committed
Fix formatting issue and enable clang-format check
1 parent d7d0203 commit 59a3dbb

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

flake.nix

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,14 @@
149149
buildInputs = [ pkgs.clang-tools_17 ];
150150
src = ./.;
151151
} ''
152-
# TODO: Uncomment the following lines to check the code format.
153-
# cp -r $src/* .
154-
# clang-format --dry-run --Werror $(find ./apps ./include ./examples ./tests ./docs -name '*.hpp' -o -name '*.cpp')
152+
cp -r $src/. .
153+
154+
# Find only real source files (*.cpp, *.hpp) in apps, include, examples, and tests
155+
files=$(find ./apps ./include ./examples ./tests ./docs \( -name '*.hpp' -o -name '*.cpp' \))
156+
157+
# Run clang-format check
158+
clang-format --dry-run --Werror $files
159+
155160
touch $out
156161
'';
157162

include/openpfc/fft.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class FFT {
3535
heffte::plan_options plan_options = heffte::default_options<heffte::backend::fftw>())
3636
: m_decomposition(decomposition),
3737
m_fft({m_decomposition.inbox, m_decomposition.outbox, m_decomposition.r2c_direction, comm, plan_options}),
38-
m_wrk(std::vector<std::complex<double>>(m_fft.size_workspace())) {};
38+
m_wrk(std::vector<std::complex<double>>(m_fft.size_workspace())){};
3939

4040
/**
4141
* @brief Performs the forward FFT transformation.

0 commit comments

Comments
 (0)