Skip to content

Commit 0e3a6d3

Browse files
committed
Fix enum flag recognitions.
1 parent 3f7afa5 commit 0e3a6d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

HexaGen/GenerationSteps/EnumGenerationStep.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,14 @@ protected virtual CsEnumMetadata ParseEnum(CppEnum cppEnum, ICppMember cppMember
258258

259259
if (item?.Value == null) continue; // skip on null.
260260
// do Flags check post mapper, cuz value could change.
261-
if (long.TryParse(item.Value, out var numLong))
261+
if (long.TryParse(item.CppValue, out var numLong))
262262
{
263263
if (!(numLong == 0 || numLong > 0 && (numLong & numLong - 1) == 0))
264264
{
265265
flags = false;
266266
}
267267
}
268-
if (ulong.TryParse(item.Value, out ulong numULong))
268+
if (ulong.TryParse(item.CppValue, out ulong numULong))
269269
{
270270
if (!(numULong == 0 || numULong > 0 && (numULong & numULong - 1) == 0))
271271
{

0 commit comments

Comments
 (0)