mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-14 18:51:47 -07:00
more progress
This commit is contained in:
@ -53,7 +53,7 @@ constexpr StrC implementation_guard_end = txt(R"(
|
||||
|
||||
void format_file( char const* path )
|
||||
{
|
||||
String resolved_path = String::make(GlobalAllocator, to_str(path));
|
||||
String resolved_path = String::make(GlobalAllocator, to_strc_from_c_str(path));
|
||||
|
||||
String style_arg = String::make(GlobalAllocator, txt("-style=file:"));
|
||||
style_arg.append("../scripts/.clang-format ");
|
||||
@ -289,7 +289,7 @@ int gen_main()
|
||||
break;
|
||||
case CT_Variable:
|
||||
{
|
||||
if (contains(entry->Name, txt("Msg_Invalid_Value")))
|
||||
if ( strc_contains(entry->Name, txt("Msg_Invalid_Value")))
|
||||
{
|
||||
CodeDefine define = def_define(entry->Name, entry->Value->Content);
|
||||
printing.append(define);
|
||||
|
@ -283,11 +283,11 @@ CodeBody gen_array( StrC type, StrC array_name )
|
||||
#pragma pop_macro( "GEN_ASSERT" )
|
||||
|
||||
return def_global_body( args(
|
||||
def_pragma( to_str( str_fmt_buf( "region %S", array_type ))),
|
||||
def_pragma( string_to_strc( string_fmt_buf( GlobalAllocator, "region %S", array_type ))),
|
||||
fmt_newline,
|
||||
result,
|
||||
fmt_newline,
|
||||
def_pragma( to_str( str_fmt_buf( "endregion %S", array_type ))),
|
||||
def_pragma( string_to_strc(string_fmt_buf( GlobalAllocator, "endregion %S", array_type ))),
|
||||
fmt_newline
|
||||
));
|
||||
};
|
||||
|
@ -341,14 +341,14 @@ CodeBody gen_hashtable( StrC type, StrC hashtable_name )
|
||||
, type.Len, type.Ptr );
|
||||
|
||||
return def_global_body(args(
|
||||
def_pragma( to_str( str_fmt_buf( "region %S", tbl_type ))),
|
||||
def_pragma( string_to_strc( string_fmt_buf( GlobalAllocator, "region %S", tbl_type ))),
|
||||
fmt_newline,
|
||||
hashtable_types,
|
||||
fmt_newline,
|
||||
entry_array,
|
||||
hashtable_def,
|
||||
fmt_newline,
|
||||
def_pragma( to_str( str_fmt_buf( "endregion %S", tbl_type ))),
|
||||
def_pragma( string_to_strc( string_fmt_buf( GlobalAllocator, "endregion %S", tbl_type ))),
|
||||
fmt_newline
|
||||
));
|
||||
}
|
||||
|
Reference in New Issue
Block a user