Skip to content

Commit

Permalink
Update stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
scallyw4g committed Aug 10, 2024
1 parent 1b2b6d3 commit f0584df
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion external/bonsai_stdlib
21 changes: 14 additions & 7 deletions generated/generate_string_table_entity_behavior_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ ToStringPrefixless(entity_behavior_flags Type)
{
u32 CurrentFlags = u32(Type);

u32 FirstValue = UnsetLeastSignificantSetBit(&CurrentFlags);
Result = ToStringPrefixless(entity_behavior_flags(FirstValue));

while (CurrentFlags)
if (CountBitsSet_Kernighan(CurrentFlags) == 1)
{
u32 Value = UnsetLeastSignificantSetBit(&CurrentFlags);
cs Next = ToStringPrefixless(entity_behavior_flags(Value));
Result = FSz("%S | %S", Result, Next);
Result = FSz("(invalid value for entity_behavior_flags (%d))", CurrentFlags);
}
else
{
u32 FirstValue = UnsetLeastSignificantSetBit(&CurrentFlags);
Result = ToStringPrefixless(entity_behavior_flags(FirstValue));

while (CurrentFlags)
{
u32 Value = UnsetLeastSignificantSetBit(&CurrentFlags);
cs Next = ToStringPrefixless(entity_behavior_flags(Value));
Result = FSz("%S | %S", Result, Next);
}
}
} break;

Expand Down
21 changes: 14 additions & 7 deletions generated/string_and_value_tables_engine_debug_view_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,21 @@ ToStringPrefixless(engine_debug_view_mode Type)
{
u32 CurrentFlags = u32(Type);

u32 FirstValue = UnsetLeastSignificantSetBit(&CurrentFlags);
Result = ToStringPrefixless(engine_debug_view_mode(FirstValue));

while (CurrentFlags)
if (CountBitsSet_Kernighan(CurrentFlags) == 1)
{
u32 Value = UnsetLeastSignificantSetBit(&CurrentFlags);
cs Next = ToStringPrefixless(engine_debug_view_mode(Value));
Result = FSz("%S | %S", Result, Next);
Result = FSz("(invalid value for engine_debug_view_mode (%d))", CurrentFlags);
}
else
{
u32 FirstValue = UnsetLeastSignificantSetBit(&CurrentFlags);
Result = ToStringPrefixless(engine_debug_view_mode(FirstValue));

while (CurrentFlags)
{
u32 Value = UnsetLeastSignificantSetBit(&CurrentFlags);
cs Next = ToStringPrefixless(engine_debug_view_mode(Value));
Result = FSz("%S | %S", Result, Next);
}
}
} break;

Expand Down

0 comments on commit f0584df

Please sign in to comment.