@@ -41,26 +41,34 @@ RED4EXT_INLINE void Dump(std::filesystem::path aOutPath, std::filesystem::path a
41
41
{
42
42
size_t i = 0 ;
43
43
44
- constexpr std::string_view exceptions[] = {" AI" , " GpuWrapApi" , " GpuWrapApiVertexPacking" };
45
-
46
- for (const auto & exception : exceptions)
44
+ static constexpr std::pair<std::string_view, bool > uniqueNamespaces[] = {
45
+ {" AI" , false },
46
+ {" inGame" , true },
47
+ {" GpuWrapApi" , true },
48
+ {" GpuWrapApiVertexPacking" , true }
49
+ };
50
+
51
+ for (const auto & [name, isSpecialCase] : uniqueNamespaces)
47
52
{
48
- if (aInput.size () > exception .size () && aInput.starts_with (exception ))
53
+ if (aInput.size () > name .size () && aInput.starts_with (name ))
49
54
{
50
- i = exception.size ();
51
- }
52
- }
55
+ i = name.size ();
53
56
54
- // Special case for enums under `GpuWrapApi` i.e. `eTextureType`
55
- if ((aInput.starts_with (" GpuWrapApi" ) || aInput.starts_with (" GpuWrapApiVertexPacking" )) && aInput[i] == ' e' )
56
- {
57
- return aInput.substr (0 , i);
58
- }
57
+ if (isSpecialCase)
58
+ {
59
+ // Special case of "in", this will break directory layout for "ink", "interop", etc..
60
+ if (aInput.starts_with (" inGame" ))
61
+ {
62
+ return " " ;
63
+ }
59
64
60
- // Special case of "in", this will break directory layout for "ink", "interop", etc..
61
- if (aInput.starts_with (" inGame" ))
62
- {
63
- return " " ;
65
+ // Special case for enums under `GpuWrapApi` i.e. `eTextureType`
66
+ if (name.starts_with (" GpuWrapApi" ) && aInput[i] == ' e' )
67
+ {
68
+ return aInput.substr (0 , i);
69
+ }
70
+ }
71
+ }
64
72
}
65
73
66
74
for (; i < aInput.size (); ++i)
0 commit comments