File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ namespace Publishers {
149149 _adminLock.Unlock ();
150150 }
151151 else {
152- const string msg = _queue.front ();
152+ string msg = std::move ( _queue.front () );
153153 _queue.pop ();
154154 _adminLock.Unlock ();
155155
@@ -169,11 +169,11 @@ namespace Publishers {
169169 {
170170 }
171171
172- void UDPOutput::Channel::Output (const string& text)
172+ void UDPOutput::Channel::Output (string& & text)
173173 {
174174 _adminLock.Lock ();
175175
176- _queue.push ( text);
176+ _queue.emplace ( std::move ( text) );
177177
178178 _adminLock.Unlock ();
179179
Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ namespace Publishers {
354354 explicit Channel (const Core::NodeId& nodeId);
355355 ~Channel () override ;
356356
357- void Output (const string& text);
357+ void Output (string& & text);
358358
359359 private:
360360 uint16_t SendData (uint8_t * dataFrame, const uint16_t maxSendSize) override ;
You can’t perform that action at this time.
0 commit comments