FIX: remove template from cpp

This commit is contained in:
Robin Dietzel 2023-01-26 14:20:08 +01:00
parent 1a926be1b7
commit e435291279
3 changed files with 11 additions and 16 deletions

View File

@ -7,6 +7,6 @@
// Auto generated header file containing the last git revision
#define GIT_HASH "f4e1b25"
#define GIT_HASH "b7b396d"
#endif //FLOATPUMP_GIT_REVISION_TEMPLATE_H

View File

@ -51,7 +51,16 @@ namespace floatpump {
std::string m_name;
bool m_entered = false;
auto buildString(std::string appendix) -> std::string;
auto buildString(std::string appendix) -> std::string {
int spaces = 19 - (m_name.length() + appendix.length());
std::string spacer;
if (spaces > 0)
spacer.append(spaces, ' ');
else if (spaces < 0)
return "ERROR";
return {m_name + spacer + appendix};
}
};

View File

@ -111,18 +111,4 @@ namespace floatpump::menu {
return nullptr;
}
}
template<typename T>
auto MenuEntry<T>::buildString(std::string appendix) -> std::string {
int spaces = 19 - (m_name.length() + appendix.length());
std::string spacer;
if (spaces > 0)
spacer.append(spaces, ' ');
else if (spaces < 0)
return "ERROR";
return {m_name + spacer + appendix};
}
}