copy! not reference. copy!

This commit is contained in:
Martin Brodbeck 2024-02-25 19:39:13 +01:00
parent 4b0b6bbcea
commit 491d5e34f1
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ void Keyer::setSpeed(uint8_t wpm)
m_elementDuration = calcElementDurationUs(wpm); m_elementDuration = calcElementDurationUs(wpm);
} }
void Keyer::sendMessage(std::string &msg) void Keyer::sendMessage(std::string msg)
{ {
std::string morse = messageToMorse(msg); std::string morse = messageToMorse(msg);
printf("Morse (%i): %s\n", morse.length(), morse.c_str()); printf("Morse (%i): %s\n", morse.length(), morse.c_str());

View file

@ -14,7 +14,7 @@ class Keyer final
void setMode(Mode mode) { m_mode = mode; } void setMode(Mode mode) { m_mode = mode; }
void setSpeed(uint8_t wpm); void setSpeed(uint8_t wpm);
void sendMessage(std::string &msg); void sendMessage(std::string msg);
void run(); void run();
void stop(); void stop();