Skip to content

fix(PolyAroundVertex): Fixed issue where cached value contained nothi…#1283

Open
MelchiorSchuh wants to merge 1 commit into
nextfrom
fix/poly_around_vertex_returns_empty
Open

fix(PolyAroundVertex): Fixed issue where cached value contained nothi…#1283
MelchiorSchuh wants to merge 1 commit into
nextfrom
fix/poly_around_vertex_returns_empty

Conversation

@MelchiorSchuh
Copy link
Copy Markdown
Member

…ng but was not updated

@MelchiorSchuh MelchiorSchuh requested a review from BotellaA June 4, 2026 13:18
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 64 concern(s)
  • include/geode/basic/cached_value.hpp:38:11: warning: [cppcoreguidelines-special-member-functions]

    class 'CachedValue' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor

       38 |     class CachedValue
          |           ^
  • include/geode/basic/cached_value.hpp:43:22: warning: [modernize-type-traits]

    use c++14 style type templates

       43 |             typename std::add_pointer< ReturnType( Args... ) >::type;
          |             ~~~~~~~~ ^                                        ~~~~~~
          |                                      _t
  • include/geode/basic/cached_value.hpp:48:13: warning: [cppcoreguidelines-prefer-member-initializer]

    'value_' should be initialized in a member initializer of the constructor

       46 |         CachedValue( const CachedValue& other )
          |                                                
          |                                                 : value_(other.value_)
       47 |         {
       48 |             value_ = other.value_;
          |             ^~~~~~~~~~~~~~~~~~~~~~
  • include/geode/basic/cached_value.hpp:49:13: warning: [cppcoreguidelines-prefer-member-initializer]

    'computed_' should be initialized in a member initializer of the constructor

       46 |         CachedValue( const CachedValue& other )
          |                                                
          |                                                , computed_(other.computed_.load())
       47 |         {
       48 |             value_ = other.value_;
       49 |             computed_ = other.computed_.load();
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • include/geode/basic/cached_value.hpp:53:13: warning: [cppcoreguidelines-prefer-member-initializer]

    'value_' should be initialized in a member initializer of the constructor

       51 |         CachedValue( CachedValue&& other ) noexcept
          |                                                    
          |                                                     : value_(std::move( other.value_ ))
       52 |         {
       53 |             value_ = std::move( other.value_ );
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • include/geode/basic/cached_value.hpp:54:13: warning: [cppcoreguidelines-prefer-member-initializer]

    'computed_' should be initialized in a member initializer of the constructor

       51 |         CachedValue( CachedValue&& other ) noexcept
          |                                                    
          |                                                    , computed_(other.computed_.load())
       52 |         {
       53 |             value_ = std::move( other.value_ );
       54 |             computed_ = other.computed_.load();
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • include/geode/basic/cached_value.hpp:57:22: warning: [cert-oop54-cpp]

    operator=() does not handle self-assignment properly

       57 |         CachedValue& operator=( const CachedValue& other )
          |                      ^
  • include/geode/basic/cached_value.hpp:119:38: warning: [cppcoreguidelines-init-variables]

    variable 'computed' is not initialized

      119 |                                 bool computed;
          |                                      ^       
          |                                               = false
  • src/geode/mesh/core/solid_mesh.cpp:27:1: warning: [readability-duplicate-include]

    duplicate include

       26 | 
       27 | #include <stack>
          | ^~~~~~~~~~~~~~~~
  • src/geode/mesh/core/solid_mesh.cpp:165:52: warning: [readability-function-cognitive-complexity]

    function 'propagate_around_edge' has cognitive complexity of 16 (threshold 10)

      165 |     std::tuple< geode::PolyhedraAroundEdge, bool > propagate_around_edge(
          |                                                    ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:174:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      174 |         do
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:176:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      176 |             if( const auto adj = solid.polyhedron_adjacent_facet( facet ) )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:180:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      180 |                 for( const auto f : geode::LRange{ solid.nb_polyhedron_facets(
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:183:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      183 |                     if( adj_facet.facet_id == f )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:187:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      187 |                     if( solid.is_edge_in_polyhedron_facet(
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:195:13: note: +1, nesting level increased to 2
      195 |             else
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:200:18: note: +1
      200 |                  && safety_count < MAX_SAFETY_COUNT );
          |                  ^
  • src/geode/mesh/core/solid_mesh.cpp:174:9: warning: [cppcoreguidelines-avoid-do-while]

    avoid do-while loops

      174 |         do
          |         ^
  • src/geode/mesh/core/solid_mesh.cpp:216:37: warning: [readability-function-cognitive-complexity]

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

      216 |     std::optional< geode::index_t > first_polyhedron_around_edge(
          |                                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:220:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      220 |         for( const auto vertex : vertices )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:222:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      222 |             for( const auto& polyhedron :
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:225:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      225 |                 for( const auto& edge_vertices :
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:229:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      229 |                     if( vertices == edge_vertices
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:230:25: note: +1
      230 |                         || ( vertices[0] == edge_vertices[1]
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:231:30: note: +1
      231 |                              && vertices[1] == edge_vertices[0] ) )
          |                              ^
  • src/geode/mesh/core/solid_mesh.cpp:258:48: warning: [readability-function-cognitive-complexity]

    function 'compute_polyhedra_around_vertex' has cognitive complexity of 14 (threshold 10)

      258 |     geode::internal::PolyhedraAroundVertexImpl compute_polyhedra_around_vertex(
          |                                                ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:263:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      263 |         if( !first_polyhedron )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:280:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      280 |         while( !S.empty() && safety_count < MAX_SAFETY_COUNT )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:280:27: note: +1
      280 |         while( !S.empty() && safety_count < MAX_SAFETY_COUNT )
          |                           ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:287:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      287 |             for( const auto& polyhedron_facet :
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:292:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      292 |                 if( !adj_polyhedron )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:298:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      298 |                 if( !polyhedra_visited.insert( p_adj ).second )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:302:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      302 |                 if( const auto v_adj =
          |                 ^
  • src/geode/mesh/core/solid_mesh.cpp:276:36: warning: [cppcoreguidelines-avoid-magic-numbers]

    20 is a magic number; consider replacing it with a named constant

      276 |         polyhedra_visited.reserve( 20 );
          |                                    ^
  • src/geode/mesh/core/solid_mesh.cpp:277:47: warning: [readability-identifier-length]

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

      277 |         std::stack< geode::PolyhedronVertex > S;
          |                                               ^
  • src/geode/mesh/core/solid_mesh.cpp:277:47: warning: [readability-identifier-naming]

    invalid case style for variable 'S'

      277 |         std::stack< geode::PolyhedronVertex > S;
          |                                               ^
          |                                               s
      278 |         S.push( first_polyhedron.value() );
          |         ~
          |         s
      279 |         polyhedra_visited.insert( first_polyhedron->polyhedron_id );
      280 |         while( !S.empty() && safety_count < MAX_SAFETY_COUNT )
          |                 ~
          |                 s
      281 |         {
      282 |             safety_count++;
      283 |             result.polyhedra.push_back( S.top() );
          |                                         ~
          |                                         s
      284 |             const auto& polyhedron_vertex_id = result.polyhedra.back();
      285 |             S.pop();
          |             ~
          |             s
  • src/geode/mesh/core/solid_mesh.cpp:432:35: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: polyhedron_around_vertex_, polyhedra_around_vertex_

      432 |     class SolidMesh< dimension >::Impl
          |                                   ^
  • src/geode/mesh/core/solid_mesh.cpp:442:9: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: polyhedron_around_vertex_, polyhedra_around_vertex_

      442 |         explicit Impl( SolidMesh& solid )
          |         ^
  • src/geode/mesh/core/solid_mesh.cpp:444:59: error: [clang-diagnostic-error]

    use of undeclared identifier 'VariableAttribute'

      444 |                       .template find_or_create_attribute< VariableAttribute,
          |                                                           ^
  • src/geode/mesh/core/solid_mesh.cpp:452:30: warning: [readability-function-cognitive-complexity]

    function 'vertices_around_vertex' has cognitive complexity of 15 (threshold 10)

      452 |         VerticesAroundVertex vertices_around_vertex(
          |                              ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:456:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      456 |             for( const auto& poly_vertex :
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:459:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      459 |                 for( const auto& poly_edge : mesh.polyhedron_edges_vertices(
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:462:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      462 |                     if( poly_edge[0] == vertex_id )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:464:25: note: +4, including nesting penalty of 3, nesting level increased to 4
      464 |                         if( absl::c_find( result, poly_edge[1] )
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:470:26: note: +1, nesting level increased to 3
      470 |                     else if( poly_edge[1] == vertex_id )
          |                          ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:472:25: note: +4, including nesting penalty of 3, nesting level increased to 4
      472 |                         if( absl::c_find( result, poly_edge[0] )
          |                         ^
  • src/geode/mesh/core/solid_mesh.cpp:683:57: error: [clang-diagnostic-error]

    use of undeclared identifier 'VariableAttribute'

      683 |                     .template find_or_create_attribute< VariableAttribute,
          |                                                         ^
  • src/geode/mesh/core/solid_mesh.cpp:812:26: error: [clang-diagnostic-error]

    use of undeclared identifier 'VariableAttribute'

      812 |         std::shared_ptr< VariableAttribute< PolyhedronVertex > >
          |                          ^
  • src/geode/mesh/core/solid_mesh.cpp:814:34: error: [clang-diagnostic-error]

    use of undeclared identifier 'VariableAttribute'

      814 |         mutable std::shared_ptr< VariableAttribute< CachedPolyhedra > >
          |                                  ^
  • src/geode/mesh/core/solid_mesh.cpp:929:18: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      929 |                / 2.;
          |                  ^
  • src/geode/mesh/core/solid_mesh.cpp:963:21: warning: [readability-identifier-length]

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

      963 |         const auto& p0 = this->point( first_pt_index );
          |                     ^
  • src/geode/mesh/core/solid_mesh.cpp:978:29: warning: [readability-identifier-length]

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

      978 |                 const auto& p1 = this->point( facet_vertices[i - 2] );
          |                             ^
  • src/geode/mesh/core/solid_mesh.cpp:979:29: warning: [readability-identifier-length]

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

      979 |                 const auto& p2 = this->point( facet_vertices[i - 1] );
          |                             ^
  • src/geode/mesh/core/solid_mesh.cpp:980:29: warning: [readability-identifier-length]

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

      980 |                 const auto& p3 = this->point( facet_vertices[i] );
          |                             ^
  • src/geode/mesh/core/solid_mesh.cpp:999:21: warning: [readability-identifier-length]

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

      999 |         const auto& p1 = this->point( vertices[0] );
          |                     ^
  • src/geode/mesh/core/solid_mesh.cpp:1002:25: warning: [readability-identifier-length]

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

     1002 |             const auto& p2 = this->point( vertices[i] );
          |                         ^
  • src/geode/mesh/core/solid_mesh.cpp:1003:25: warning: [readability-identifier-length]

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

     1003 |             const auto& p3 = this->point( vertices[i + 1] );
          |                         ^
  • src/geode/mesh/core/solid_mesh.cpp:1018:21: warning: [readability-identifier-length]

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

     1018 |         const auto& p0 = this->point( facet_vertices[0] );
          |                     ^
  • src/geode/mesh/core/solid_mesh.cpp:1022:25: warning: [readability-identifier-length]

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

     1022 |             const auto& p1 = this->point( facet_vertices[v - 1] );
          |                         ^
  • src/geode/mesh/core/solid_mesh.cpp:1023:25: warning: [readability-identifier-length]

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

     1023 |             const auto& p2 = this->point( facet_vertices[v] );
          |                         ^
  • src/geode/mesh/core/solid_mesh.cpp:1092:33: warning: [readability-function-cognitive-complexity]

    function 'polyhedron_facet_edge_from_vertices' has cognitive complexity of 23 (threshold 10)

     1092 |         SolidMesh< dimension >::polyhedron_facet_edge_from_vertices(
          |                                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1097:9: note: +1, including nesting penalty of 0, nesting level increased to 1
     1097 |         for( const auto f : LIndices{ facet_vertices } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1100:13: note: +2, including nesting penalty of 1, nesting level increased to 2
     1100 |             for( const auto v : LIndices{ vertices } )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1102:17: note: +3, including nesting penalty of 2, nesting level increased to 3
     1102 |                 if( vertices[v] == edge_vertices[0] )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1104:64: note: +4, including nesting penalty of 3, nesting level increased to 4
     1104 |                     const auto next = v == vertices.size() - 1 ? 0 : v + 1;
          |                                                                ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1105:21: note: +4, including nesting penalty of 3, nesting level increased to 4
     1105 |                     if( vertices[next] == edge_vertices[1] )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1113:22: note: +1, nesting level increased to 3
     1113 |                 else if( vertices[v] == edge_vertices[1] )
          |                      ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1115:64: note: +4, including nesting penalty of 3, nesting level increased to 4
     1115 |                     const auto next = v == vertices.size() - 1 ? 0 : v + 1;
          |                                                                ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1116:21: note: +4, including nesting penalty of 3, nesting level increased to 4
     1116 |                     if( vertices[next] == edge_vertices[0] )
          |                     ^
  • src/geode/mesh/core/solid_mesh.cpp:1159:13: warning: [llvm-else-after-return]

    do not use 'else' after 'return'

     1159 |             else
          |             ^~~~
     1160 |             {
          |             ~
     1161 |                 return { facet.value() };
          |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
     1162 |             }
          |             ~
  • src/geode/mesh/core/solid_mesh.cpp:1194:34: warning: [readability-function-cognitive-complexity]

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

     1194 |     bool SolidMesh< dimension >::is_edge_in_polyhedron_facet(
          |                                  ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1200:9: note: +1, including nesting penalty of 0, nesting level increased to 1
     1200 |         if( it == facet_vertices.end() )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1205:9: note: +1, including nesting penalty of 0, nesting level increased to 1
     1205 |         if( it_next != facet_vertices.end() )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1207:13: note: +2, including nesting penalty of 1, nesting level increased to 2
     1207 |             if( *it_next == edge_vertices[1] )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1212:9: note: +1, nesting level increased to 1
     1212 |         else
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1214:13: note: +2, including nesting penalty of 1, nesting level increased to 2
     1214 |             if( facet_vertices[0] == edge_vertices[1] )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1220:9: note: +1, including nesting penalty of 0, nesting level increased to 1
     1220 |         if( it != facet_vertices.begin() )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1223:13: note: +2, including nesting penalty of 1, nesting level increased to 2
     1223 |             if( *it_prev == edge_vertices[1] )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1228:9: note: +1, nesting level increased to 1
     1228 |         else
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1230:13: note: +2, including nesting penalty of 1, nesting level increased to 2
     1230 |             if( facet_vertices[facet_vertices.size() - 1] == edge_vertices[1] )
          |             ^
  • src/geode/mesh/core/solid_mesh.cpp:1199:20: warning: [readability-identifier-length]

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

     1199 |         const auto it = absl::c_find( facet_vertices, edge_vertices[0] );
          |                    ^
  • src/geode/mesh/core/solid_mesh.cpp:1412:42: warning: [hicpp-move-const-arg]

    std::move of the variable 'polyhedron_facet' of the trivially-copyable type 'PolyhedronFacet' has no effect; remove std::move()

     1412 |                     facets.emplace_back( std::move( polyhedron_facet ) );
          |                                          ^~~~~~~~~~                  ~
  • src/geode/mesh/core/solid_mesh.cpp:1508:20: warning: [readability-identifier-length]

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

     1508 |         const auto v0 =
          |                    ^
  • src/geode/mesh/core/solid_mesh.cpp:1517:20: warning: [readability-identifier-length]

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

     1517 |         const auto v1 = polyhedron_facet_vertex(
          |                    ^
  • src/geode/mesh/core/solid_mesh.cpp:1544:33: warning: [readability-function-cognitive-complexity]

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

     1544 |         SolidMesh< dimension >::polyhedron_adjacent_facet(
          |                                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1548:9: note: +1, including nesting penalty of 0, nesting level increased to 1
     1548 |         if( !opt_polyhedron_adj )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1554:9: note: +1, including nesting penalty of 0, nesting level increased to 1
     1554 |         for( const auto v : LIndices{ vertices } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1559:9: note: +1, including nesting penalty of 0, nesting level increased to 1
     1559 |         for( const auto f : LRange{ nb_polyhedron_facets( polyhedron_adj ) } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1561:13: note: +2, including nesting penalty of 1, nesting level increased to 2
     1561 |             if( polyhedron_adjacent( { polyhedron_adj, f } )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1567:13: note: +2, including nesting penalty of 1, nesting level increased to 2
     1567 |             for( const auto v : LRange{
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1570:17: note: +3, including nesting penalty of 2, nesting level increased to 3
     1570 |                 if( absl::c_find( vertices, polyhedron_facet_vertex(
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/solid_mesh.cpp:1578:13: note: +2, including nesting penalty of 1, nesting level increased to 2
     1578 |             if( all_contained )
          |             ^
  • src/geode/mesh/core/surface_mesh.cpp:116:9: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'not_same_orientation' of similar type ('const geode::PolygonEdge &') are easily swapped by mistake

      116 |         const geode::PolygonEdge& current_edge,
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      117 |         const geode::PolygonEdge& adj_edge )
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:116:35: note: the first parameter in the range is 'current_edge'
      116 |         const geode::PolygonEdge& current_edge,
          |                                   ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:117:35: note: the last parameter in the range is 'adj_edge'
      117 |         const geode::PolygonEdge& adj_edge )
          |                                   ^~~~~~~~
  • src/geode/mesh/core/surface_mesh.cpp:151:47: warning: [readability-function-cognitive-complexity]

    function 'compute_polygons_around_vertex' has cognitive complexity of 11 (threshold 10)

      151 |     geode::internal::PolygonsAroundVertexImpl compute_polygons_around_vertex(
          |                                               ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:156:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      156 |         if( !first_polygon )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:169:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      169 |         do
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:181:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      181 |             if( !cur_polygon_vertex )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:186:18: note: +1
      186 |                  && safety_count < MAX_SAFETY_COUNT );
          |                  ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:189:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      189 |         if( result.vertex_is_on_border )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:195:9: note: +1, nesting level increased to 1
      195 |         else
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:199:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      199 |         while( cur_polygon_vertex && safety_count < MAX_SAFETY_COUNT )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:199:35: note: +1
      199 |         while( cur_polygon_vertex && safety_count < MAX_SAFETY_COUNT )
          |                                   ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:209:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      209 |             if( !cur_polygon_vertex )
          |             ^
  • src/geode/mesh/core/surface_mesh.cpp:169:9: warning: [cppcoreguidelines-avoid-do-while]

    avoid do-while loops

      169 |         do
          |         ^
  • src/geode/mesh/core/surface_mesh.cpp:285:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

      285 |         Impl( SurfaceMesh& surface )
          |         ^
          |         explicit 
  • src/geode/mesh/core/surface_mesh.cpp:754:35: warning: [readability-function-cognitive-complexity]

    function 'polygon_adjacent_edge' has cognitive complexity of 27 (threshold 10)

      754 |         SurfaceMesh< dimension >::polygon_adjacent_edge(
          |                                   ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:758:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      758 |         if( !polygon_adj )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:768:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      768 |         for( const auto edge_id : LRange{ nb_edges } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:771:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      771 |             if( v0 == adj_vertices[edge_id] )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:775:25: note: +3, including nesting penalty of 2, nesting level increased to 3
      775 |                         ? 0u
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:777:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      777 |                 if( v1 == adj_vertices[enext] )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:779:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      779 |                     if( polygon_adjacent( polygon_adj_edge )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:787:18: note: +1, nesting level increased to 2
      787 |             else if( v1 == adj_vertices[edge_id] )
          |                  ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:791:25: note: +3, including nesting penalty of 2, nesting level increased to 3
      791 |                         ? 0u
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:793:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      793 |                 if( v0 == adj_vertices[enext] )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:795:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      795 |                     if( polygon_adjacent( polygon_adj_edge )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:804:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      804 |         if( failed_edges.empty() )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:819:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      819 |         for( const auto& edge : failed_edges )
          |         ^
  • src/geode/mesh/core/surface_mesh.cpp:763:20: warning: [readability-identifier-length]

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

      763 |         const auto v0 = polygon_vertex( PolygonVertex{ polygon_edge } );
          |                    ^
  • src/geode/mesh/core/surface_mesh.cpp:764:20: warning: [readability-identifier-length]

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

      764 |         const auto v1 = polygon_edge_vertex( polygon_edge, 1 );
          |                    ^
  • src/geode/mesh/core/surface_mesh.cpp:775:27: warning: [hicpp-uppercase-literal-suffix]

    integer literal has suffix 'u', which is not uppercase

      775 |                         ? 0u
          |                           ^~
          |                            U
  • src/geode/mesh/core/surface_mesh.cpp:791:27: warning: [hicpp-uppercase-literal-suffix]

    integer literal has suffix 'u', which is not uppercase

      791 |                         ? 0u
          |                           ^~
          |                            U
  • src/geode/mesh/core/surface_mesh.cpp:851:39: warning: [hicpp-move-const-arg]

    std::move of the variable 'edge' of the trivially-copyable type 'PolygonEdge' has no effect; remove std::move()

      851 |                 borders.emplace_back( std::move( edge ) );
          |                                       ^~~~~~~~~~      ~
  • src/geode/mesh/core/surface_mesh.cpp:869:17: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      869 |                 polygon_adjacent_edge( next_border ).value() );
          |                 ^
  • src/geode/mesh/core/surface_mesh.cpp:887:17: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      887 |                 polygon_adjacent_edge( previous_border ).value() );
          |                 ^
  • src/geode/mesh/core/surface_mesh.cpp:920:18: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      920 |                / 2.;
          |                  ^
  • src/geode/mesh/core/surface_mesh.cpp:991:13: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'polygon_edge_from_vertices' of similar type ('index_t') are easily swapped by mistake

      991 |             index_t from_vertex_id, index_t to_vertex_id ) const
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:991:21: note: the first parameter in the range is 'from_vertex_id'
      991 |             index_t from_vertex_id, index_t to_vertex_id ) const
          |                     ^~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:991:45: note: the last parameter in the range is 'to_vertex_id'
      991 |             index_t from_vertex_id, index_t to_vertex_id ) const
          |                                             ^~~~~~~~~~~~
  • src/geode/mesh/core/surface_mesh.cpp:1144:21: warning: [readability-identifier-length]

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

     1144 |         const auto& p1 = this->point( vertices[0] );
          |                     ^
  • src/geode/mesh/core/surface_mesh.cpp:1147:25: warning: [readability-identifier-length]

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

     1147 |             const auto& p2 = this->point( vertices[i] );
          |                         ^
  • src/geode/mesh/core/surface_mesh.cpp:1148:25: warning: [readability-identifier-length]

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

     1148 |             const auto& p3 = this->point( vertices[i + 1] );
          |                         ^
  • src/geode/mesh/core/surface_mesh.cpp:1165:21: warning: [readability-identifier-length]

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

     1165 |         const auto& p1 = this->point( vertices[0] );
          |                     ^
  • src/geode/mesh/core/surface_mesh.cpp:1168:25: warning: [readability-identifier-length]

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

     1168 |             const auto& p2 = this->point( vertices[i] );
          |                         ^
  • src/geode/mesh/core/surface_mesh.cpp:1169:25: warning: [readability-identifier-length]

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

     1169 |             const auto& p3 = this->point( vertices[i + 1] );
          |                         ^
  • src/geode/mesh/core/surface_mesh.cpp:1191:14: warning: [modernize-type-traits]

    use c++14 style type templates

     1191 |     typename std::enable_if< T == 3, std::optional< Vector3D > >::type
          |     ~~~~~~~~ ^                                                  ~~~~~~
          |                            _t
  • src/geode/mesh/core/surface_mesh.cpp:1201:14: warning: [modernize-type-traits]

    use c++14 style type templates

     1201 |     typename std::enable_if< T == 3, std::optional< Vector3D > >::type
          |     ~~~~~~~~ ^                                                  ~~~~~~
          |                            _t

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