core: convert load-git.c to C++

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-02-28 08:42:23 +01:00 committed by Michael Keller
parent d803e42314
commit c05be40bfd
5 changed files with 126 additions and 158 deletions

View file

@ -86,13 +86,13 @@ const char *cylinderuse_text[NUM_GAS_USE] = {
QT_TRANSLATE_NOOP("gettextFromC", "OC-gas"), QT_TRANSLATE_NOOP("gettextFromC", "diluent"), QT_TRANSLATE_NOOP("gettextFromC", "oxygen"), QT_TRANSLATE_NOOP("gettextFromC", "not used")
};
int cylinderuse_from_text(const char *text)
enum cylinderuse cylinderuse_from_text(const char *text)
{
for (enum cylinderuse i = 0; i < NUM_GAS_USE; i++) {
if (same_string(text, cylinderuse_text[i]) || same_string(text, translate("gettextFromC", cylinderuse_text[i])))
return i;
}
return -1;
return (enum cylinderuse)-1;
}
/* Add a metric or an imperial tank info structure. Copies the passed-in string. */