mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix for EnumVal's returning their underlying value
Change EnumVal()->AsEnum() to zeek_int_t.
This commit is contained in:
parent
802d24cad7
commit
b7f7d32bf7
5 changed files with 14 additions and 10 deletions
|
@ -1336,7 +1336,7 @@ string CPPCompile::GenEnum(const TypePtr& t, const ValPtr& ev)
|
|||
|
||||
if ( ! et->HasRedefs() )
|
||||
// Can use direct access.
|
||||
return Fmt(v);
|
||||
return std::to_string(v);
|
||||
|
||||
// Need to dynamically map the access.
|
||||
int mapping_slot;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue