Skip to content

Commit

Permalink
Std::move (#376)
Browse files Browse the repository at this point in the history
* Std::move

* added missing std::move (#377)

---------

Co-authored-by: Manuel Otheo <[email protected]>
  • Loading branch information
getnamo and Lootheo authored Sep 6, 2023
1 parent 64b4360 commit 2156f78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Source/SocketIOLib/Private/internal/sio_client_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace sio
string query_str_value = encode_query_string(it->second);
query_str.append(query_str_value);
}
m_query_string = move(query_str);
m_query_string = std::move(query_str);

m_http_headers = headers;
m_auth = auth;
Expand Down
16 changes: 8 additions & 8 deletions Source/SocketIOLib/Public/sio_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ namespace sio
}

string_message(std::string&& v)
:message(flag_string),_v(move(v))
:message(flag_string),_v(std::move(v))
{
}
public:
Expand All @@ -216,7 +216,7 @@ namespace sio

static message::ptr create(std::string&& v)
{
return ptr(new string_message(move(v)));
return ptr(new string_message(std::move(v)));
}

std::string const& get_string() const
Expand Down Expand Up @@ -270,7 +270,7 @@ namespace sio

void push(std::string&& text)
{
_v.push_back(string_message::create(move(text)));
_v.push_back(string_message::create(std::move(text)));
}

void push(std::shared_ptr<std::string> const& binary)
Expand All @@ -297,7 +297,7 @@ namespace sio

void insert(size_t pos,std::string&& text)
{
_v.insert(_v.begin()+pos, string_message::create(move(text)));
_v.insert(_v.begin()+pos, string_message::create(std::move(text)));
}

void insert(size_t pos,std::shared_ptr<std::string> const& binary)
Expand Down Expand Up @@ -362,7 +362,7 @@ namespace sio

void insert(const std::string & key,std::string&& text)
{
_v[key] = string_message::create(move(text));
_v[key] = string_message::create(std::move(text));
}

void insert(const std::string & key,std::shared_ptr<std::string> const& binary)
Expand Down Expand Up @@ -462,7 +462,7 @@ namespace sio

list(std::string&& text)
{
m_vector.push_back(string_message::create(move(text)));
m_vector.push_back(string_message::create(std::move(text)));
}

list(std::shared_ptr<std::string> const& binary)
Expand Down Expand Up @@ -490,7 +490,7 @@ namespace sio

void push(std::string&& text)
{
m_vector.push_back(string_message::create(move(text)));
m_vector.push_back(string_message::create(std::move(text)));
}

void push(std::shared_ptr<std::string> const& binary)
Expand All @@ -517,7 +517,7 @@ namespace sio

void insert(size_t pos,std::string&& text)
{
m_vector.insert(m_vector.begin()+pos, string_message::create(move(text)));
m_vector.insert(m_vector.begin()+pos, string_message::create(std::move(text)));
}

void insert(size_t pos,std::shared_ptr<std::string> const& binary)
Expand Down

0 comments on commit 2156f78

Please sign in to comment.