mirror of
				https://github.com/Ed94/gencpp.git
				synced 2025-11-03 23:36:12 -08:00 
			
		
		
		
	Corrected order of Str to how the slice type is defined in Odin and RAD Debugger (my reference on slice types)
This commit is contained in:
		@@ -48,13 +48,13 @@ Str access_spec_to_str( AccessSpec type )
 | 
			
		||||
{
 | 
			
		||||
	local_persist
 | 
			
		||||
	Str lookup[ (u32)AccessSpec_Num_AccessSpec ] = {
 | 
			
		||||
		{ sizeof("") - 1,          "" },
 | 
			
		||||
		{ sizeof("prviate") - 1,   "private" },
 | 
			
		||||
		{ sizeof("protected") - 1, "private" },
 | 
			
		||||
		{ sizeof("public") - 1,    "public" },
 | 
			
		||||
		{ "",        sizeof( "" )        - 1 },
 | 
			
		||||
		{ "private", sizeof("prviate")   - 1 },
 | 
			
		||||
		{ "private", sizeof("protected") - 1 },
 | 
			
		||||
		{ "public",  sizeof("public")    - 1 },
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	Str invalid = { sizeof("Invalid") - 1, "Invalid" };
 | 
			
		||||
	Str invalid = { "Invalid", sizeof("Invalid") - 1 };
 | 
			
		||||
	if ( type > AccessSpec_Public )
 | 
			
		||||
		return invalid;
 | 
			
		||||
 | 
			
		||||
@@ -101,13 +101,13 @@ Str module_flag_to_str( ModuleFlag flag )
 | 
			
		||||
{
 | 
			
		||||
	local_persist
 | 
			
		||||
	Str lookup[ (u32)Num_ModuleFlags ] = {
 | 
			
		||||
		{ sizeof("__none__"), "__none__" },
 | 
			
		||||
		{ sizeof("export"), "export" },
 | 
			
		||||
		{ sizeof("import"), "import" },
 | 
			
		||||
		{ "__none__", sizeof("__none__") - 1 },
 | 
			
		||||
		{ "export",   sizeof("export")   - 1  },
 | 
			
		||||
		{ "import",   sizeof("import")   - 1 },
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	local_persist
 | 
			
		||||
	Str invalid_flag = { sizeof("invalid"), "invalid" };
 | 
			
		||||
	Str invalid_flag = { "invalid", sizeof("invalid") };
 | 
			
		||||
	if ( flag > ModuleFlag_Import )
 | 
			
		||||
		return invalid_flag;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user