mirror of https://github.com/rusefi/rusefi-1.git
efi::size
This commit is contained in:
parent
fe3f0d5b7a
commit
9000af369b
|
@ -893,7 +893,7 @@ static plain_get_float_s getF_plain[] = {
|
|||
|
||||
static plain_get_float_s * findFloat2(const char *name) {
|
||||
plain_get_float_s *currentF = &getF_plain[0];
|
||||
while (currentF < getF_plain + sizeof(getF_plain)/sizeof(getF_plain[0])) {
|
||||
while (currentF < getF_plain + efi::size(getF_plain)) {
|
||||
if (strEqualCaseInsensitive(name, currentF->token)) {
|
||||
return currentF;
|
||||
}
|
||||
|
@ -904,7 +904,7 @@ static plain_get_float_s * findFloat2(const char *name) {
|
|||
|
||||
static plain_get_integer_s *findInt(const char *name) {
|
||||
plain_get_integer_s *currentI = &getI_plain[0];
|
||||
while (currentI < getI_plain + sizeof(getI_plain)/sizeof(getI_plain[0])) {
|
||||
while (currentI < getI_plain + efi::size(getI_plain)) {
|
||||
if (strEqualCaseInsensitive(name, currentI->token)) {
|
||||
return currentI;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class GetConfigValueConsumer implements ConfigurationConsumer {
|
|||
private static final String FIND_METHOD =
|
||||
"plain_get_float_s * findFloat(const char *name) {\n" +
|
||||
"\tplain_get_float_s *currentF = &getF_plain[0];\n" +
|
||||
"\twhile (currentF < getF_plain + sizeof(getF_plain)/sizeof(getF_plain[0])) {\n" +
|
||||
"\twhile (currentF < getF_plain + efi::size(getF_plain)) {\n" +
|
||||
"\t\tif (strEqualCaseInsensitive(name, currentF->token)) {\n" +
|
||||
"\t\t\treturn currentF;\n" +
|
||||
"\t\t}\n" +
|
||||
|
|
|
@ -155,7 +155,7 @@ public class GetConfigValueConsumerTest {
|
|||
"\n" +
|
||||
"plain_get_float_s * findFloat(const char *name) {\n" +
|
||||
"\tplain_get_float_s *currentF = &getF_plain[0];\n" +
|
||||
"\twhile (currentF < getF_plain + sizeof(getF_plain)/sizeof(getF_plain[0])) {\n" +
|
||||
"\twhile (currentF < getF_plain + efi::size(getF_plain)) {\n" +
|
||||
"\t\tif (strEqualCaseInsensitive(name, currentF->token)) {\n" +
|
||||
"\t\t\treturn currentF;\n" +
|
||||
"\t\t}\n" +
|
||||
|
|
Loading…
Reference in New Issue