reduce flash footprint by smarter code generation #4163
This commit is contained in:
parent
a42b579010
commit
78a45ee9df
Binary file not shown.
|
@ -27,8 +27,7 @@ public class GetConfigValueConsumer implements ConfigurationConsumer {
|
|||
"#include \"value_lookup.h\"\n";
|
||||
|
||||
private static final String GET_METHOD_HEADER =
|
||||
"float getConfigValueByName(const char *name) {\n" +
|
||||
"\t{\n";
|
||||
"float getConfigValueByName(const char *name) {\n";
|
||||
|
||||
static final String GET_METHOD_FOOTER = "\treturn EFI_ERROR_CODE;\n" + "}\n";
|
||||
private static final String SET_METHOD_HEADER = "void setConfigValueByName(const char *name, float value) {\n" +
|
||||
|
|
|
@ -24,7 +24,6 @@ public class GetConfigValueConsumerTest {
|
|||
|
||||
assertEquals(
|
||||
"float getConfigValueByName(const char *name) {\n" +
|
||||
"\t{\n" +
|
||||
"\treturn EFI_ERROR_CODE;\n" +
|
||||
"}\n", getConfigValueConsumer.getCompleteGetterBody());
|
||||
}
|
||||
|
@ -61,7 +60,6 @@ public class GetConfigValueConsumerTest {
|
|||
"\t}\n", getConfigValueConsumer.getSetterBody());
|
||||
|
||||
assertEquals("float getConfigValueByName(const char *name) {\n" +
|
||||
"\t{\n" +
|
||||
"\tint hash = djb2lowerCase(name);\n" +
|
||||
"\tswitch(hash) {\n" +
|
||||
"\t\tcase -672272162:\n" +
|
||||
|
@ -131,7 +129,6 @@ public class GetConfigValueConsumerTest {
|
|||
assertEquals("#include \"pch.h\"\n" +
|
||||
"#include \"value_lookup.h\"\n" +
|
||||
"float getConfigValueByName(const char *name) {\n" +
|
||||
"\t{\n" +
|
||||
"\tint hash = djb2lowerCase(name);\n" +
|
||||
"\tswitch(hash) {\n" +
|
||||
"\t\tcase -1832527325:\n" +
|
||||
|
|
Loading…
Reference in New Issue