fuuuuuuuu

This commit is contained in:
Johannes Wendel
2019-07-16 22:12:46 +02:00
parent 25a937cc2d
commit 5fe28d46d9
48 changed files with 625 additions and 726 deletions

View File

@@ -17,7 +17,7 @@ namespace items
namespace detail
{
Display::Display(uint8_t address, uint8_t id) :
Display::Display(const uint8_t & address, const uint8_t & id) :
address(address),
id(id)
{
@@ -29,7 +29,7 @@ uint8_t Display::get_id() const
return this->id;
}
void Display::write_score(unsigned int score, unsigned int length)
void Display::write_score(const unsigned int & score, const unsigned int & length)
{
auto score_string = std::to_string(score);
@@ -38,7 +38,7 @@ void Display::write_score(unsigned int score, unsigned int length)
write_content(score_string, length);
}
std::string Display::fit_score_string(std::string &score_string, unsigned int length)
std::string Display::fit_score_string(std::string & score_string, const unsigned int & length)
{
auto score_length = score_string.length();
@@ -46,7 +46,6 @@ std::string Display::fit_score_string(std::string &score_string, unsigned int le
{
CLOG(DEBUG, OUTPUT_LOGGER) << "Score too long for display";
std::string full_display;
// TODO mach mal schöner hier wird 9999 angezeigt wenn die zahl zu groß is
return full_display.insert(0, length, '9');
}
@@ -54,7 +53,7 @@ std::string Display::fit_score_string(std::string &score_string, unsigned int le
return score_string;
}
void Display::write_content(std::string content, unsigned int length)
void Display::write_content(std::string & content, const unsigned int & length)
{
if(content.size() > length)
{