mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
headergen_v2: only generate GET_VARIANT macro if needed
This is an internal macro which is only used if has_sct() is set by the generator, so don't generate it if we don't need to. Change-Id: I7ad51ad34ecabd833b84a270b5046e77131dcb41
This commit is contained in:
parent
f50455f6a7
commit
af9156406d
1 changed files with 25 additions and 22 deletions
|
@ -1527,6 +1527,8 @@ bool common_generator::generate_macro_header(error_context_t& ectx)
|
|||
ctx.print(fout);
|
||||
fout << "\n";
|
||||
|
||||
if(has_sct())
|
||||
{
|
||||
/* print GET_VARIANT macro */
|
||||
std::string get_var = macro_name(MN_GET_VARIANT);
|
||||
fout << "/** " << get_var << "\n";
|
||||
|
@ -1549,6 +1551,7 @@ bool common_generator::generate_macro_header(error_context_t& ectx)
|
|||
fout << "#define " << get_var << "__(name, index, varp, vars) "
|
||||
<< "varp##name##vars index\n";
|
||||
fout << "\n";
|
||||
}
|
||||
|
||||
/* print BF_OR macro */
|
||||
std::string bf_or = macro_name(MN_FIELD_OR);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue