From 491d5e34f1d69c1d96e9f9c6f8b1b5978ccbeedb Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Sun, 25 Feb 2024 19:39:13 +0100 Subject: [PATCH] copy! not reference. copy! --- src/keyer.cpp | 2 +- src/keyer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/keyer.cpp b/src/keyer.cpp index 453098b..5e06b7b 100644 --- a/src/keyer.cpp +++ b/src/keyer.cpp @@ -48,7 +48,7 @@ void Keyer::setSpeed(uint8_t wpm) m_elementDuration = calcElementDurationUs(wpm); } -void Keyer::sendMessage(std::string &msg) +void Keyer::sendMessage(std::string msg) { std::string morse = messageToMorse(msg); printf("Morse (%i): %s\n", morse.length(), morse.c_str()); diff --git a/src/keyer.h b/src/keyer.h index 05cef60..3b7e2ba 100644 --- a/src/keyer.h +++ b/src/keyer.h @@ -14,7 +14,7 @@ class Keyer final void setMode(Mode mode) { m_mode = mode; } void setSpeed(uint8_t wpm); - void sendMessage(std::string &msg); + void sendMessage(std::string msg); void run(); void stop();