Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/Simple-WebSocket-Server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreidheim <eidheim@gmail.com>2017-05-17 13:32:34 +0300
committereidheim <eidheim@gmail.com>2017-05-17 13:32:34 +0300
commit460f2e87723f5d77a832a41fa0f8e3ee4c7247c2 (patch)
tree7ccfa502f784e51718eaa900a33438a6ded5fecc
parent62d9175d77f1497a5515de709cd9598c92e6949b (diff)
Removed unnecessary shared_ptr copies in echo_all examplesv1.3.1
-rw-r--r--ws_examples.cpp2
-rw-r--r--wss_examples.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/ws_examples.cpp b/ws_examples.cpp
index e02adec..34e33f4 100644
--- a/ws_examples.cpp
+++ b/ws_examples.cpp
@@ -96,7 +96,7 @@ int main() {
auto message_str=message->string();
//echo_all.get_connections() can also be used to solely receive connections on this endpoint
- for(auto a_connection: server.get_connections()) {
+ for(auto &a_connection: server.get_connections()) {
auto send_stream=make_shared<WsServer::SendStream>();
*send_stream << message_str;
diff --git a/wss_examples.cpp b/wss_examples.cpp
index 69c36b2..203f4d6 100644
--- a/wss_examples.cpp
+++ b/wss_examples.cpp
@@ -96,7 +96,7 @@ int main() {
auto message_str=message->string();
//echo_all.get_connections() can also be used to solely receive connections on this endpoint
- for(auto a_connection: server.get_connections()) {
+ for(auto &a_connection: server.get_connections()) {
auto send_stream=make_shared<WssServer::SendStream>();
*send_stream << message_str;