Skip to content

fix(attribute): Fixed has_value() function when no_value is set at st… - #1334

Merged
BotellaA merged 4 commits into
nextfrom
fix/attribute_has_value_if_novalue_at_nan
Sep 17, 2026
Merged

BotellaA merged 4 commits into
nextfrom
fix/attribute_has_value_if_novalue_at_nan

Conversation

@MelchiorSchuh

Copy link
Copy Markdown
Member

…d::nan

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 30 concern(s)
  • include/geode/basic/sparse_attribute.hpp:137:30: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      137 |             values_.reserve( 10 );
          |                              ^
  • include/geode/basic/sparse_attribute.hpp:140:9: warning: [google-explicit-constructor]

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

      140 |         SparseAttribute( std::string_view name )
          |         ^
          |         explicit 
  • include/geode/basic/sparse_attribute.hpp:167:62: warning: [readability-identifier-length]

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

      167 |                              []( Archive& archive2, index_t& i, T& item ) {
          |                                                              ^
  • include/geode/basic/sparse_attribute.hpp:181:65: warning: [readability-identifier-length]

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

      181 |                                 []( Archive& archive2, index_t& i, T& item ) {
          |                                                                 ^
  • include/geode/basic/sparse_attribute.hpp:186:30: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      186 |             values_.reserve( 10 );
          |                              ^
  • include/geode/basic/sparse_attribute.hpp:302:31: warning: [readability-identifier-length]

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

      302 |             for( const auto& [in, outs] : old2new_mapping.in2out_map() )
          |                               ^
  • include/geode/basic/sparse_attribute.hpp:332:31: warning: [readability-identifier-length]

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

      332 |             for( const auto& [in, outs] : old2new_mapping.in2out_map() )
          |                               ^
  • include/geode/basic/variable_attribute.hpp:129:30: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      129 |             values_.reserve( 10 );
          |                              ^
  • include/geode/basic/variable_attribute.hpp:132:9: warning: [google-explicit-constructor]

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

      132 |         VariableAttribute( std::string_view name )
          |         ^
          |         explicit 
  • include/geode/basic/variable_attribute.hpp:170:30: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      170 |             values_.reserve( 10 );
          |                              ^
  • include/geode/basic/variable_attribute.hpp:308:31: warning: [readability-identifier-length]

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

      308 |             for( const auto& [in, outs] : old2new_mapping.in2out_map() )
          |                               ^
  • include/geode/basic/variable_attribute.hpp:337:55: warning: [hicpp-move-const-arg]

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

      337 |             : VariableAttribute( default_value, name, std::move( properties ) )
          |                                                       ^~~~~~~~~~            ~
  • include/geode/basic/variable_attribute.hpp:343:20: warning: [cppcoreguidelines-pro-type-reinterpret-cast]

    do not use reinterpret_cast

      343 |             return reinterpret_cast< const bool& >( values_[element] );
          |                    ^
  • include/geode/basic/variable_attribute.hpp:353:32: warning: [hicpp-move-const-arg]

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

      353 |             values_[element] = std::move( value );
          |                                ^~~~~~~~~~       ~
  • include/geode/basic/variable_attribute.hpp:353:32: warning: [readability-implicit-bool-conversion]

    implicit conversion 'bool' -> 'value_type' (aka 'unsigned char')

      353 |             values_[element] = std::move( value );
          |                                ^                 
          |                                static_cast<value_type>( )
  • include/geode/basic/variable_attribute.hpp:364:23: warning: [cppcoreguidelines-pro-type-reinterpret-cast]

    do not use reinterpret_cast

      364 |             modifier( reinterpret_cast< bool& >( values_[element] ) );
          |                       ^
  • include/geode/basic/variable_attribute.hpp:391:48: warning: [hicpp-move-const-arg]

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

      391 |             : ReadOnlyAttribute< bool >( name, std::move( properties ) ),
          |                                                ^~~~~~~~~~            ~
  • include/geode/basic/variable_attribute.hpp:394:30: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      394 |             values_.reserve( 10 );
          |                              ^
  • include/geode/basic/variable_attribute.hpp:397:9: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: default_values_

      397 |         VariableAttribute( std::string_view name )
          |         ^
  • include/geode/basic/variable_attribute.hpp:397:9: warning: [google-explicit-constructor]

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

      397 |         VariableAttribute( std::string_view name )
          |         ^
          |         explicit 
  • include/geode/basic/variable_attribute.hpp:400:9: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: default_values_

      400 |         VariableAttribute()
          |         ^
  • include/geode/basic/variable_attribute.hpp:412:31: warning: [cppcoreguidelines-init-variables]

    variable 'old_value' is not initialized

      412 |                          bool old_value;
          |                               ^        
          |                                         = false
  • include/geode/basic/variable_attribute.hpp:431:30: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      431 |             values_.reserve( 10 );
          |                              ^
  • include/geode/basic/variable_attribute.hpp:470:38: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      470 |                     default_values_, this->name().value(), this->properties() }
          |                                      ^~~~~~~~~~~~
  • include/geode/basic/variable_attribute.hpp:490:34: warning: [readability-implicit-bool-conversion]

    implicit conversion 'bool' -> 'value_type' (aka 'unsigned char')

      490 |                     values_[i] = typed_attribute.value( i );
          |                                  ^                         
          |                                  static_cast<value_type>(  )
  • include/geode/basic/variable_attribute.hpp:502:38: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      502 |                     default_values_, this->name().value(), this->properties() }
          |                                      ^~~~~~~~~~~~
  • include/geode/basic/variable_attribute.hpp:535:38: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      535 |                     default_values_, this->name().value(), this->properties() }
          |                                      ^~~~~~~~~~~~
  • include/geode/basic/variable_attribute.hpp:541:31: warning: [readability-identifier-length]

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

      541 |             for( const auto& [in, outs] : old2new_mapping.in2out_map() )
          |                               ^
  • include/geode/basic/variable_attribute.hpp:571:31: warning: [readability-identifier-length]

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

      571 |             for( const auto& [in, outs] : old2new_mapping.in2out_map() )
          |                               ^
  • include/geode/basic/variable_attribute.hpp:582:45: warning: [readability-redundant-member-init]

    initializer for member 'values_' is redundant

      582 |         std::vector< unsigned char > values_{};
          |                                             ^~

Have any feedback or feature suggestions? Share it here.

@BotellaA
BotellaA merged commit d627291 into next Sep 17, 2026
19 checks passed
@BotellaA
BotellaA deleted the fix/attribute_has_value_if_novalue_at_nan branch September 17, 2026 15:59
@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 18.1.8-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 18.1.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants