From 6e10a169448e057db4baf604b948569b412f21f2 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Thu, 23 Jan 2025 15:51:24 +0100 Subject: [PATCH 1/2] Applying diff from clang_format --- src/geant4/app/src/ExN01UserScoreWriter.cc | 4 ++-- src/make_watertight/CheckWatertight.cpp | 10 ++++------ src/make_watertight/Zip.cpp | 2 +- src/make_watertight/tests/test_classes.hpp | 2 +- src/overlap_check/app/overlap_check.cpp | 6 ++---- src/overlap_check/test/overlap_check_test.hpp | 2 +- src/tally/Tally.cpp | 4 ++-- 7 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/geant4/app/src/ExN01UserScoreWriter.cc b/src/geant4/app/src/ExN01UserScoreWriter.cc index 4fe0f8e9bc..e2de60e4af 100644 --- a/src/geant4/app/src/ExN01UserScoreWriter.cc +++ b/src/geant4/app/src/ExN01UserScoreWriter.cc @@ -104,8 +104,8 @@ void ExN01UserScoreWriter::DumpAllQuantitiesToFile(const G4String& fileName, rval = MBI()->tag_set_data(tag_handle, &(mesh_elements[idx]), 1, &result); } // z - } // y - } // x + } // y + } // x } // save the file diff --git a/src/make_watertight/CheckWatertight.cpp b/src/make_watertight/CheckWatertight.cpp index 87da69b9bc..8a91e0e168 100644 --- a/src/make_watertight/CheckWatertight.cpp +++ b/src/make_watertight/CheckWatertight.cpp @@ -314,21 +314,19 @@ moab::ErrorCode CheckWatertight::check_mesh_for_watertightness( the_coords_and_id[j].z2 = endpt_coords[2]; } std::cout << " edge of surf " << the_coords_and_id[j].surf_id - << " unmatched: " - << " (" << the_coords_and_id[j].x1 << "," + << " unmatched: " << " (" << the_coords_and_id[j].x1 << "," << the_coords_and_id[j].y1 << "," << the_coords_and_id[j].z1 << ") (" << the_coords_and_id[j].x2 << "," << the_coords_and_id[j].y2 << "," << the_coords_and_id[j].z2 - << ")" - << " v0=" << the_coords_and_id[j].vert1 + << ")" << " v0=" << the_coords_and_id[j].vert1 << " v1=" << the_coords_and_id[j].vert2 << " j=" << j << " k=" << k << std::endl; } unmatched_counter++; break; } // k loop - } // j loop - } // volume loop + } // j loop + } // volume loop if (!test) { // print time and summary diff --git a/src/make_watertight/Zip.cpp b/src/make_watertight/Zip.cpp index edbf404bb0..efebbc256f 100644 --- a/src/make_watertight/Zip.cpp +++ b/src/make_watertight/Zip.cpp @@ -419,7 +419,7 @@ moab::ErrorCode Zip::remove_inverted_tris(moab::Tag normal_tag, } } // loop until the entire surface has attempted to be refaceted - } // loop over each patch of inverted tris + } // loop over each patch of inverted tris if (failures_occur) { if (debug) diff --git a/src/make_watertight/tests/test_classes.hpp b/src/make_watertight/tests/test_classes.hpp index 4a43207a47..400784d790 100644 --- a/src/make_watertight/tests/test_classes.hpp +++ b/src/make_watertight/tests/test_classes.hpp @@ -26,7 +26,7 @@ class MakeWatertightTest : public ::testing::Test { virtual void SetUp(); void reload_mesh(); virtual void TearDown(); - virtual void setFilename(){}; + virtual void setFilename() {}; // make sure the expected number of entities with dimension are present moab::ErrorCode check_num_ents(int ent_dimension, int expected_num); diff --git a/src/overlap_check/app/overlap_check.cpp b/src/overlap_check/app/overlap_check.cpp index 37b2bcaea2..267bc528c9 100644 --- a/src/overlap_check/app/overlap_check.cpp +++ b/src/overlap_check/app/overlap_check.cpp @@ -48,15 +48,13 @@ int main(int argc, char* argv[]) { MB_CHK_SET_ERR(rval, "Failed to load file: " << filename); if (points_per_tri_edge == 0) { - std::cout << "NOTICE: " - << "\n"; + std::cout << "NOTICE: " << "\n"; std::cout << "\t Performing overlap check using triangle vertex locations only." << "\n" << "\t Use the '-p' option to check more points on the triangle edges." << "\n" - << "\t Run '$ overlap_check --help' for more information." - << "\n\n"; + << "\t Run '$ overlap_check --help' for more information." << "\n\n"; } std::cout << "Running overlap check:" << std::endl; diff --git a/src/overlap_check/test/overlap_check_test.hpp b/src/overlap_check/test/overlap_check_test.hpp index a5e1272f9a..de6dbf7c1b 100644 --- a/src/overlap_check/test/overlap_check_test.hpp +++ b/src/overlap_check/test/overlap_check_test.hpp @@ -10,7 +10,7 @@ class OverlapTest : public ::testing::Test { protected: virtual void SetUp() override; virtual void TearDown() override; - virtual void SetFilename(){}; + virtual void SetFilename() {}; std::string filename; diff --git a/src/tally/Tally.cpp b/src/tally/Tally.cpp index edb24e959d..1ae54fb21e 100644 --- a/src/tally/Tally.cpp +++ b/src/tally/Tally.cpp @@ -102,8 +102,8 @@ bool Tally::get_energy_bin(double energy, unsigned int& ebin) { break; } } // end for - } // end else in bounds and >1 energy bin - } // end if in bounds + } // end else in bounds and >1 energy bin + } // end if in bounds return bin_exists; } From ece252051364cc560ef52f96a85129feff5c3b2b Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Thu, 23 Jan 2025 15:54:07 +0100 Subject: [PATCH 2/2] changelog --- doc/CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 2480d32eff..a2b030fda1 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -7,6 +7,9 @@ DAGMC Changelog Next version ==================== +**Changed:** + * Update formating of few files to comply with clang-format (#937) + v3.2.4 ====================