reduce flash footprint by smarter code generation #4163

This commit is contained in:
rusefillc 2022-12-04 00:46:07 -05:00
parent a42b579010
commit 78a45ee9df
3 changed files with 1 additions and 5 deletions

Binary file not shown.

View File

@ -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" +

View File

@ -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" +