mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 21:38:40 +00:00
moved enum handling code to separate files
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
internal String8
|
||||
mscrt_string_from_eh_adjectives(Arena *arena, MSCRT_EhHandlerTypeFlags adjectives)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
String8List adj_list = {0};
|
||||
if (adjectives & MSCRT_EhHandlerTypeFlag_IsConst) {
|
||||
str8_list_pushf(scratch.arena, &adj_list, "Const");
|
||||
}
|
||||
if (adjectives & MSCRT_EhHandlerTypeFlag_IsVolatile) {
|
||||
str8_list_pushf(scratch.arena, &adj_list, "Volatile");
|
||||
}
|
||||
if (adjectives & MSCRT_EhHandlerTypeFlag_IsUnaligned) {
|
||||
str8_list_pushf(scratch.arena, &adj_list, "Unaligned");
|
||||
}
|
||||
if (adjectives & MSCRT_EhHandlerTypeFlag_IsReference) {
|
||||
str8_list_pushf(scratch.arena, &adj_list, "Reference");
|
||||
}
|
||||
if (adjectives & MSCRT_EhHandlerTypeFlag_IsResumable) {
|
||||
str8_list_pushf(scratch.arena, &adj_list, "Resumable");
|
||||
}
|
||||
if (adjectives & MSCRT_EhHandlerTypeFlag_IsStdDotDot) {
|
||||
str8_list_pushf(scratch.arena, &adj_list, "StdDotDot");
|
||||
}
|
||||
if (adjectives & MSCRT_EhHandlerTypeFlag_IsComplusEH) {
|
||||
str8_list_pushf(scratch.arena, &adj_list, "ComplusEH");
|
||||
}
|
||||
String8 result = str8_list_join(arena, &adj_list, &(StringJoin){.sep=str8_lit(", ")});
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#ifndef MSVC_CRT_ENUM_H
|
||||
#define MSVC_CRT_ENUM_H
|
||||
|
||||
internal String8 mscrt_string_from_eh_adjectives(Arena *arena, MSCRT_EhHandlerTypeFlags adjectives);
|
||||
|
||||
#endif // MSVC_CRT_ENUM_H
|
||||
Reference in New Issue
Block a user