modernize-use-auto

This commit is contained in:
Serge Lamikhov-Center 2021-08-26 13:08:15 +03:00
parent 1343e5f979
commit 35eb9cfa6d
2 changed files with 5 additions and 5 deletions

View File

@ -344,11 +344,11 @@ template <class S> class symbol_section_accessor_template
if ( ( convertor( bloom_filter[bloom_index] ) & bloom_bits ) == if ( ( convertor( bloom_filter[bloom_index] ) & bloom_bits ) ==
bloom_bits ) { bloom_bits ) {
uint32_t bucket = hash % nbuckets; uint32_t bucket = hash % nbuckets;
uint32_t* buckets = auto* buckets =
(uint32_t*)( hash_section->get_data() + 4 * sizeof( uint32_t ) + (uint32_t*)( hash_section->get_data() + 4 * sizeof( uint32_t ) +
bloom_size * sizeof( T ) ); bloom_size * sizeof( T ) );
uint32_t* chains = auto* chains =
(uint32_t*)( hash_section->get_data() + 4 * sizeof( uint32_t ) + (uint32_t*)( hash_section->get_data() + 4 * sizeof( uint32_t ) +
bloom_size * sizeof( T ) + bloom_size * sizeof( T ) +
nbuckets * sizeof( uint32_t ) ); nbuckets * sizeof( uint32_t ) );

View File

@ -36,10 +36,10 @@ THE SOFTWARE.
virtual void set_##NAME( TYPE value ) = 0 virtual void set_##NAME( TYPE value ) = 0
#define ELFIO_GET_ACCESS( TYPE, NAME, FIELD ) \ #define ELFIO_GET_ACCESS( TYPE, NAME, FIELD ) \
TYPE get_##NAME() const { return ( *convertor )( FIELD ); } TYPE get_##NAME() const override { return ( *convertor )( FIELD ); }
#define ELFIO_SET_ACCESS( TYPE, NAME, FIELD ) \ #define ELFIO_SET_ACCESS( TYPE, NAME, FIELD ) \
void set_##NAME( TYPE value ) \ void set_##NAME( TYPE value ) override \
{ \ { \
FIELD = value; \ FIELD = value; \
FIELD = ( *convertor )( FIELD ); \ FIELD = ( *convertor )( FIELD ); \