Skip to content

fix(Tuple): remove std::make_pair and std::make_tuple - #201

Open
BenPinet wants to merge 1 commit into
v18from
fix/remove_make_pair_and_tuple
Open

fix(Tuple): remove std::make_pair and std::make_tuple#201
BenPinet wants to merge 1 commit into
v18from
fix/remove_make_pair_and_tuple

Conversation

@BenPinet

@BenPinet BenPinet commented Aug 6, 2026

Copy link
Copy Markdown
Member

No description provided.

@BenPinet
BenPinet requested a review from BotellaA August 6, 2026 12:10
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 26 concern(s)
  • src/geode/io/model/msh_input.cpp:118:14: warning: [readability-function-cognitive-complexity]

    function 'build_topology' has cognitive complexity of 13 (threshold 10)

      118 |         void build_topology()
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:120:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      120 |             if( version() == 4
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:121:17: note: +1
      121 |                 && ( absl::c_find( sections_, "$Entities" )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:129:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      129 |             for( const auto uv : geode::Range{ brep_.nb_unique_vertices() } )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:139:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      139 |             for( const auto uv : geode::Range{ brep_.nb_unique_vertices() } )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:150:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      150 |             for( const auto& c2l : corner_line_relations )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:152:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      152 |                 for( const auto& line_id : c2l.second )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:158:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      158 |             for( const auto& l2s : line_surface_relations )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:160:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      160 |                 for( const auto& surface_id : l2s.second )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:166:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      166 |             for( const auto& s2b : surface_block_relations )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:168:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      168 |                 for( const auto& block_id : s2b.second )
          |                 ^
  • src/geode/io/model/msh_input.cpp:129:29: warning: [readability-identifier-length]

    variable name 'uv' is too short, expected at least 3 characters

      129 |             for( const auto uv : geode::Range{ brep_.nb_unique_vertices() } )
          |                             ^
  • src/geode/io/model/msh_input.cpp:139:29: warning: [readability-identifier-length]

    variable name 'uv' is too short, expected at least 3 characters

      139 |             for( const auto uv : geode::Range{ brep_.nb_unique_vertices() } )
          |                             ^
  • src/geode/io/model/msh_input.cpp:299:33: warning: [readability-identifier-length]

    variable name 'b' is too short, expected at least 3 characters

      299 |                 for( const auto b : geode::Range{ geode::string_to_index(
          |                                 ^
  • src/geode/io/model/msh_input.cpp:315:14: warning: [readability-function-cognitive-complexity]

    function 'create_surfaces' has cognitive complexity of 12 (threshold 10)

      315 |         void create_surfaces( const geode::index_t nb_surfaces )
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:317:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      317 |             for( const auto unused : geode::Range{ nb_surfaces } )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:334:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      334 |                 for( const auto b : geode::Range{ geode::string_to_index(
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:343:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      343 |                     if( !it.second )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:348:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      348 |                 for( const auto& boundary : boundary_counter )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:354:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      354 |                     if( boundary.second == 1 )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:359:21: note: +1, nesting level increased to 3
      359 |                     else
          |                     ^
  • src/geode/io/model/msh_input.cpp:334:33: warning: [readability-identifier-length]

    variable name 'b' is too short, expected at least 3 characters

      334 |                 for( const auto b : geode::Range{ geode::string_to_index(
          |                                 ^
  • src/geode/io/model/msh_input.cpp:339:26: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      339 |                     auto it = boundary_counter.emplace(
          |                          ^
  • src/geode/io/model/msh_input.cpp:392:33: warning: [readability-identifier-length]

    variable name 'b' is too short, expected at least 3 characters

      392 |                 for( const auto b : geode::Range{ geode::string_to_index(
          |                                 ^
  • src/geode/io/model/msh_input.cpp:428:32: warning: [cppcoreguidelines-init-variables]

    variable 'node_id' is not initialized

      428 |                 geode::index_t node_id;
          |                                ^      
          |                                        = 0
  • src/geode/io/model/msh_input.cpp:484:29: warning: [readability-identifier-length]

    variable name 'n' is too short, expected at least 3 characters

      484 |             for( const auto n : geode::Range{ nb_nodes } )
          |                             ^
  • src/geode/io/model/msh_input.cpp:593:42: warning: [readability-identifier-naming]

    invalid case style for constexpr variable 'physical_entity'

      593 |                 constexpr geode::index_t physical_entity{ 0 };
          |                                          ^~~~~~~~~~~~~~~
          |                                          PHYSICAL_ENTITY
      594 |                 const auto element =
      595 |                     geode::internal::GMSHElementFactory::create(
      596 |                         mesh_element_type_id, physical_entity, entity_id,
          |                                               ~~~~~~~~~~~~~~~
          |                                               PHYSICAL_ENTITY
  • src/geode/io/model/msh_input.cpp:604:30: warning: [readability-identifier-length]

    variable name 'c' is too short, expected at least 3 characters

      604 |             for( const auto& c : brep_.corners() )
          |                              ^
  • src/geode/io/model/msh_input.cpp:613:30: warning: [readability-identifier-length]

    variable name 'l' is too short, expected at least 3 characters

      613 |             for( const auto& l : brep_.lines() )
          |                              ^
  • src/geode/io/model/msh_input.cpp:626:14: warning: [readability-function-cognitive-complexity]

    function 'build_surfaces' has cognitive complexity of 42 (threshold 10)

      626 |         void build_surfaces()
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:628:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      628 |             for( const auto& surface : brep_.surfaces() )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:634:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      634 |                 for( const auto v : geode::Range{ mesh.nb_vertices() } )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:642:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      642 |                 for( const auto& line : brep_.internal_lines( surface ) )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:645:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      645 |                     for( const auto edge_id : geode::Range{ edges.nb_edges() } )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:655:25: note: +4, including nesting penalty of 3, nesting level increased to 4
      655 |                         for( const auto& cmv0 : cmvs0 )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:657:29: note: +5, including nesting penalty of 4, nesting level increased to 5
      657 |                             if( cmv0.component_id.id() != surface.id() )
          |                             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:661:29: note: +5, including nesting penalty of 4, nesting level increased to 5
      661 |                             for( const auto& cmv1 : cmvs1 )
          |                             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:663:33: note: +6, including nesting penalty of 5, nesting level increased to 6
      663 |                                 if( cmv1.component_id.id() != surface.id() )
          |                                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:667:33: note: +6, including nesting penalty of 5, nesting level increased to 6
      667 |                                 if( const auto edge0 =
          |                                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:673:33: note: +6, including nesting penalty of 5, nesting level increased to 6
      673 |                                 if( const auto edge1 =
          |                                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:683:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      683 |                 for( const auto& edge : polygon_edges )
          |                 ^
  • src/geode/io/model/msh_input.cpp:647:36: warning: [readability-identifier-length]

    variable name 'e0' is too short, expected at least 3 characters

      647 |                         const auto e0 = edges.edge_vertex( { edge_id, 0 } );
          |                                    ^
  • src/geode/io/model/msh_input.cpp:648:36: warning: [readability-identifier-length]

    variable name 'e1' is too short, expected at least 3 characters

      648 |                         const auto e1 = edges.edge_vertex( { edge_id, 1 } );
          |                                    ^
  • src/geode/io/model/msh_input.cpp:692:30: warning: [readability-identifier-length]

    variable name 'b' is too short, expected at least 3 characters

      692 |             for( const auto& b : brep_.blocks() )
          |                              ^
  • src/geode/io/model/msh_input.cpp:708:13: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'update_component_vertex' of similar type ('geode::index_t') are easily swapped by mistake

      708 |             geode::index_t old_line_vertex_id,
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      709 |             geode::index_t new_line_vertex_id )
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:708:28: note: the first parameter in the range is 'old_line_vertex_id'
      708 |             geode::index_t old_line_vertex_id,
          |                            ^~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:709:28: note: the last parameter in the range is 'new_line_vertex_id'
      709 |             geode::index_t new_line_vertex_id )
          |                            ^~~~~~~~~~~~~~~~~~
  • src/geode/io/model/msh_input.cpp:723:13: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'update_component_vertex' of similar type ('geode::index_t') are easily swapped by mistake

      723 |             geode::index_t old_surface_vertex_id,
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      724 |             geode::index_t new_surface_vertex_id )
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:723:28: note: the first parameter in the range is 'old_surface_vertex_id'
      723 |             geode::index_t old_surface_vertex_id,
          |                            ^~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:724:28: note: the last parameter in the range is 'new_surface_vertex_id'
      724 |             geode::index_t new_surface_vertex_id )
          |                            ^~~~~~~~~~~~~~~~~~~~~
  • src/geode/io/model/msh_input.cpp:739:13: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'update_component_vertex' of similar type ('geode::index_t') are easily swapped by mistake

      739 |             geode::index_t old_block_vertex_id,
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      740 |             geode::index_t new_block_vertex_id )
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:739:28: note: the first parameter in the range is 'old_block_vertex_id'
      739 |             geode::index_t old_block_vertex_id,
          |                            ^~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:740:28: note: the last parameter in the range is 'new_block_vertex_id'
      740 |             geode::index_t new_block_vertex_id )
          |                            ^~~~~~~~~~~~~~~~~~~
  • src/geode/io/model/msh_input.cpp:766:30: warning: [readability-identifier-length]

    variable name 'uv' is too short, expected at least 3 characters

      766 |             for( const auto& uv : unique2component )
          |                              ^
  • src/geode/io/model/msh_input.cpp:805:13: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'add_potential_relationships' of similar type ('const std::vectorgeode::ComponentMeshVertex &') are easily swapped by mistake

      805 |             const std::vector< geode::ComponentMeshVertex >&
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      806 |                 boundary_type_vertices,
          |                 ~~~~~~~~~~~~~~~~~~~~~~~
      807 |             const std::vector< geode::ComponentMeshVertex >&
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      808 |                 incidence_type_vertices,
          |                 ~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:806:17: note: the first parameter in the range is 'boundary_type_vertices'
      806 |                 boundary_type_vertices,
          |                 ^~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:808:17: note: the last parameter in the range is 'incidence_type_vertices'
      808 |                 incidence_type_vertices,
          |                 ^~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/io/model/msh_input.cpp:822:13: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'filter_potential_relationships' of similar type ('const std::vectorgeode::ComponentMeshVertex &') are easily swapped by mistake

      822 |             const std::vector< geode::ComponentMeshVertex >&
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      823 |                 boundary_type_vertices,
          |                 ~~~~~~~~~~~~~~~~~~~~~~~
      824 |             const std::vector< geode::ComponentMeshVertex >&
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      825 |                 incidence_type_vertices,
          |                 ~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:823:17: note: the first parameter in the range is 'boundary_type_vertices'
      823 |                 boundary_type_vertices,
          |                 ^~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:825:17: note: the last parameter in the range is 'incidence_type_vertices'
      825 |                 incidence_type_vertices,
          |                 ^~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/io/model/msh_input.cpp:838:22: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      838 |                 auto it = incidences_in_relations.cbegin();
          |                      ^
  • src/geode/io/model/msh_input.cpp:861:57: warning: [readability-identifier-length]

    parameter name 'uv' is too short, expected at least 3 characters

      861 |             get_component_mesh_vertices( geode::index_t uv )
          |                                                         ^
  • src/geode/io/model/msh_input.cpp:910:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

      910 | namespace geode
          | ^~~~~~~~~~~~~~~
      911 | {
          | ~
      912 |     namespace internal
          |     ~~~~~~~~~~~~~~~~~~
          |     namespace geode::internal

Have any feedback or feature suggestions? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants