mirror of
https://github.com/vtil-project/VTIL-Core
synced 2026-08-17 08:23:03 -04:00
Fixed an issue with enum_namer.
This commit is contained in:
parent
24653e7adc
commit
a46c60b736
1 changed files with 6 additions and 2 deletions
|
|
@ -71,8 +71,12 @@ namespace vtil
|
|||
static constexpr auto linear_series = make_constant_series<iteration_limit>(
|
||||
[ ] ( auto tag ) { return generate<T( decltype( tag )::value + min_value )>(); }
|
||||
);
|
||||
auto& [str, valid] = linear_series[ value ];
|
||||
if ( valid ) return std::string{ str.begin(), str.end() };
|
||||
value_type adjusted = value - min_value;
|
||||
if ( value_type( 0 ) <= adjusted && adjusted < value_type( iteration_limit ) )
|
||||
{
|
||||
auto& [str, valid] = linear_series[ adjusted ];
|
||||
if ( valid ) return std::string{ str.begin(), str.end() };
|
||||
}
|
||||
}
|
||||
// If not and type is not signed, try interpreting it as a flag combination:
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue