Skip to content

Commit

Permalink
Fix wrong placeholders in egenesis
Browse files Browse the repository at this point in the history
  • Loading branch information
pmconrad committed Mar 19, 2018
1 parent c391be0 commit 097537e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libraries/egenesis/egenesis_brief.cpp.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using namespace graphene::chain;

chain_id_type get_egenesis_chain_id()
{
return chain_id_type( "${chain_id}$" );
return chain_id_type( "${chain_id}" );
}

void compute_egenesis_json( std::string& result )
Expand Down
14 changes: 7 additions & 7 deletions libraries/egenesis/egenesis_full.cpp.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ namespace graphene { namespace egenesis {

using namespace graphene::chain;

static const char genesis_json_array[${genesis_json_array_height}$][${genesis_json_array_width}$+1] =
static const char genesis_json_array[${genesis_json_array_height}][${genesis_json_array_width}+1] =
{
${genesis_json_array}$
${genesis_json_array}
};

chain_id_type get_egenesis_chain_id()
{
return chain_id_type( "${chain_id}$" );
return chain_id_type( "${chain_id}" );
}

void compute_egenesis_json( std::string& result )
{
result.reserve( ${genesis_json_length}$ );
result.reserve( ${genesis_json_length} );
result.resize(0);
for( size_t i=0; i<${genesis_json_array_height}$-1; i++ )
for( size_t i=0; i<${genesis_json_array_height}-1; i++ )
{
result.append( genesis_json_array[i], ${genesis_json_array_width}$ );
result.append( genesis_json_array[i], ${genesis_json_array_width} );
}
result.append( std::string( genesis_json_array[ ${genesis_json_array_height}$-1 ] ) );
result.append( std::string( genesis_json_array[ ${genesis_json_array_height}-1 ] ) );
return;
}

Expand Down

0 comments on commit 097537e

Please sign in to comment.