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
+1 -1
View File
@@ -810,7 +810,7 @@ private:
inline void write(const Rtcm_Message& msg)
{
io_context_.post(
[this, msg]() {
[this, &msg]() {
bool write_in_progress = !write_msgs_.empty();
write_msgs_.push_back(msg);
if (!write_in_progress)