mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-15 03:01:47 -07:00
Reduce cpp freatures usage of Array container.
Almost ready to be inter-operable with C
This commit is contained in:
@ -70,7 +70,7 @@ CodeBody gen_eoperator( char const* path )
|
||||
String enum_entries = String::make_reserve( GlobalAllocator, kilobytes(1) );
|
||||
String to_str_entries = String::make_reserve( GlobalAllocator, kilobytes(1) );
|
||||
|
||||
for (usize idx = 0; idx < enum_strs.num(); idx++)
|
||||
for (usize idx = 0; idx < num(enum_strs); idx++)
|
||||
{
|
||||
char const* enum_str = enum_strs[idx].string;
|
||||
char const* entry_to_str = str_strs [idx].string;
|
||||
@ -126,7 +126,7 @@ CodeBody gen_especifier( char const* path )
|
||||
String enum_entries = String::make_reserve( GlobalAllocator, kilobytes(1) );
|
||||
String to_str_entries = String::make_reserve( GlobalAllocator, kilobytes(1) );
|
||||
|
||||
for (usize idx = 0; idx < enum_strs.num(); idx++)
|
||||
for (usize idx = 0; idx < num(enum_strs); idx++)
|
||||
{
|
||||
char const* enum_str = enum_strs[idx].string;
|
||||
char const* entry_to_str = str_strs [idx].string;
|
||||
@ -243,7 +243,7 @@ CodeBody gen_etoktype( char const* etok_path, char const* attr_path )
|
||||
String to_str_attributes = String::make_reserve( GlobalAllocator, kilobytes(4) );
|
||||
String attribute_define_entries = String::make_reserve( GlobalAllocator, kilobytes(4) );
|
||||
|
||||
for (usize idx = 0; idx < enum_strs.num(); idx++)
|
||||
for (usize idx = 0; idx < num(enum_strs); idx++)
|
||||
{
|
||||
char const* enum_str = enum_strs[idx].string;
|
||||
char const* entry_to_str = enum_str_strs [idx].string;
|
||||
@ -252,7 +252,7 @@ CodeBody gen_etoktype( char const* etok_path, char const* attr_path )
|
||||
to_str_entries.append_fmt( "{ sizeof(\"%s\"), \"%s\" },\n", entry_to_str, entry_to_str);
|
||||
}
|
||||
|
||||
for ( usize idx = 0; idx < attribute_strs.num(); idx++ )
|
||||
for ( usize idx = 0; idx < num(attribute_strs); idx++ )
|
||||
{
|
||||
char const* attribute_str = attribute_strs[idx].string;
|
||||
char const* entry_to_str = attribute_str_strs [idx].string;
|
||||
@ -261,7 +261,7 @@ CodeBody gen_etoktype( char const* etok_path, char const* attr_path )
|
||||
to_str_attributes.append_fmt( "{ sizeof(\"%s\"), \"%s\" },\n", entry_to_str, entry_to_str);
|
||||
attribute_define_entries.append_fmt( "Entry( Attribute_%s, \"%s\" )", attribute_str, entry_to_str );
|
||||
|
||||
if ( idx < attribute_strs.num() - 1 )
|
||||
if ( idx < num(attribute_strs) - 1 )
|
||||
attribute_define_entries.append( " \\\n");
|
||||
else
|
||||
attribute_define_entries.append( "\n");
|
||||
|
Reference in New Issue
Block a user