Skip to content

Commit

Permalink
ci, style: clang-format and macOS
Browse files Browse the repository at this point in the history
Fix clang-format changes.
Go back down to the free tier for macOS.
Update code-ql action.
  • Loading branch information
acgetchell committed Apr 13, 2024
1 parent c9733e4 commit 805d5ed
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
build:
runs-on: macos-latest-xlarge
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
Expand Down
27 changes: 12 additions & 15 deletions include/Ergodic_moves_3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,8 @@ namespace ergodic_moves
/// @param manifold The simplicial manifold
/// @param candidate The vertex to check
/// @returns True if (6,2) move is possible
[[nodiscard]] inline auto is_62_movable(Manifold const& manifold,
Vertex_handle const& candidate)
-> bool
[[nodiscard]] inline auto is_62_movable(
Manifold const& manifold, Vertex_handle const& candidate) -> bool
{
if (manifold.dimensionality() != 3)
{
Expand Down Expand Up @@ -485,8 +484,8 @@ namespace ergodic_moves
/// @see
/// https://github.com/CGAL/cgal/blob/8430d04539179f25fb8e716f99e19d28589beeda/TDS_3/include/CGAL/Triangulation_data_structure_3.h#L2094
[[nodiscard]] inline auto incident_cells_from_edge(
Delaunay_t<3> const& triangulation, Edge_handle const& edge)
-> std::optional<Cell_container>
Delaunay_t<3> const& triangulation,
Edge_handle const& edge) -> std::optional<Cell_container>
{
if (!triangulation.tds().is_edge(edge.first, edge.second, edge.third))
{
Expand Down Expand Up @@ -519,8 +518,8 @@ namespace ergodic_moves
/// @param t_edge_candidate The edge to check
/// @returns A container of incident cells if there are exactly 4 or nullopt
[[nodiscard]] inline auto find_bistellar_flip_location(
Delaunay const& triangulation, Edge_handle const& t_edge_candidate)
-> std::optional<Cell_container>
Delaunay const& triangulation,
Edge_handle const& t_edge_candidate) -> std::optional<Cell_container>
{
if (auto incident_cells =
incident_cells_from_edge(triangulation, t_edge_candidate);
Expand Down Expand Up @@ -565,10 +564,9 @@ namespace ergodic_moves
/// @param top Top vertex of the cells being flipped
/// @param bottom Bottom vertex of the cells being flipped
/// @returns A flipped triangulation or nullopt
[[nodiscard]] inline auto bistellar_flip(Delaunay triangulation,
Edge_handle edge, Vertex_handle top,
Vertex_handle bottom)
-> std::optional<Delaunay>
[[nodiscard]] inline auto bistellar_flip(
Delaunay triangulation, Edge_handle edge, Vertex_handle top,
Vertex_handle bottom) -> std::optional<Delaunay>
{
// Get the cells incident to the edge
auto incident_cells = get_incident_cells(triangulation, edge);
Expand Down Expand Up @@ -841,10 +839,9 @@ namespace ergodic_moves
/// @param t_after The manifold after the move
/// @param t_move The type of move
/// @return True if the move correctly changed the triangulation
[[nodiscard]] inline auto check_move(Manifold const& t_before,
Manifold const& t_after,
move_tracker::move_type const& t_move)
-> bool
[[nodiscard]] inline auto check_move(
Manifold const& t_before, Manifold const& t_after,
move_tracker::move_type const& t_move) -> bool
{
switch (t_move)
{
Expand Down
2 changes: 1 addition & 1 deletion include/Foliated_triangulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ namespace foliated_triangulations
{
causal_vertices.emplace_back(*gen++, i + 1);
} // j
} // i
} // i
return causal_vertices;
} // make_foliated_ball

Expand Down
2 changes: 1 addition & 1 deletion include/Geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct [[nodiscard("This contains data!")]] Geometry<3>
swap(swap_from.N1_SL, swap_into.N1_SL);
swap(swap_from.N0, swap_into.N0);
} // swap
}; // struct Geometry<3>
}; // struct Geometry<3>

using Geometry_3 = Geometry<3>;

Expand Down
2 changes: 1 addition & 1 deletion include/Metropolis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class MoveStrategy<Strategies::METROPOLIS, ManifoldType>
m_failed_moves.four_four_moves());
}
} // print_results
}; // Metropolis
}; // Metropolis

using Metropolis_3 =
MoveStrategy<Strategies::METROPOLIS, manifolds::Manifold_3>;
Expand Down
2 changes: 1 addition & 1 deletion include/Move_tracker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ namespace move_tracker
if (dim == 3) { return NUMBER_OF_3D_MOVES; }
if (dim == 4) { return NUMBER_OF_4D_MOVES; }
return 0; // Error condition
} // moves_per_dimension
} // moves_per_dimension

/**
* \brief The data and methods to track ergodic moves
Expand Down
16 changes: 7 additions & 9 deletions include/Utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ enum class topology_type
/// @param t_os The output stream
/// @param t_topology The topology
/// @returns An output string of the topology
inline auto operator<<(std::ostream& t_os, topology_type const& t_topology)
-> std::ostream&
inline auto operator<<(std::ostream& t_os,
topology_type const& t_topology) -> std::ostream&
{
switch (t_topology)
{
Expand Down Expand Up @@ -90,13 +90,11 @@ namespace utilities
/// @param t_initial_radius The radius of the first foliation t=1
/// @param t_foliation_spacing The spacing between foliations
/// @returns A filename
[[nodiscard]] inline auto make_filename(topology_type const& t_topology,
Int_precision t_dimension,
Int_precision t_number_of_simplices,
Int_precision t_number_of_timeslices,
double t_initial_radius,
double t_foliation_spacing) noexcept
-> std::filesystem::path
[[nodiscard]] inline auto make_filename(
topology_type const& t_topology, Int_precision t_dimension,
Int_precision t_number_of_simplices, Int_precision t_number_of_timeslices,
double t_initial_radius,
double t_foliation_spacing) noexcept -> std::filesystem::path
{
std::string filename;
if (t_topology == topology_type::SPHERICAL) { filename += "S"; }
Expand Down

0 comments on commit 805d5ed

Please sign in to comment.