Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Commit 460f2e8

Browse files
committed
Removed unnecessary shared_ptr copies in echo_all examples
1 parent 62d9175 commit 460f2e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ws_examples.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ int main() {
9696
auto message_str=message->string();
9797

9898
//echo_all.get_connections() can also be used to solely receive connections on this endpoint
99-
for(auto a_connection: server.get_connections()) {
99+
for(auto &a_connection: server.get_connections()) {
100100
auto send_stream=make_shared<WsServer::SendStream>();
101101
*send_stream << message_str;
102102

wss_examples.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ int main() {
9696
auto message_str=message->string();
9797

9898
//echo_all.get_connections() can also be used to solely receive connections on this endpoint
99-
for(auto a_connection: server.get_connections()) {
99+
for(auto &a_connection: server.get_connections()) {
100100
auto send_stream=make_shared<WssServer::SendStream>();
101101
*send_stream << message_str;
102102

0 commit comments

Comments
 (0)