Pass msg by reference isntead of by value

This commit is contained in:
Carles Fernandez 2023-11-26 08:57:35 +01:00
parent 5ef12c8244
commit 132f85079a
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 1 additions and 1 deletions

View File

@ -810,7 +810,7 @@ private:
inline void write(const Rtcm_Message& msg) inline void write(const Rtcm_Message& msg)
{ {
io_context_.post( io_context_.post(
[this, msg]() { [this, &msg]() {
bool write_in_progress = !write_msgs_.empty(); bool write_in_progress = !write_msgs_.empty();
write_msgs_.push_back(msg); write_msgs_.push_back(msg);
if (!write_in_progress) if (!write_in_progress)