Optimized string passing with string_view.

This commit is contained in:
Ravin Perera
2019-10-14 11:17:55 +05:30
parent ebf13209e1
commit 56c3e3ee93
10 changed files with 54 additions and 44 deletions

View File

@@ -58,7 +58,7 @@ void user_session_handler::on_message(sock::socket_session *session, const std::
if (itr != usr::pending_challenges.end())
{
std::string userpubkey;
const std::string &original_challenge = itr->second;
std::string_view original_challenge = itr->second;
if (usr::verify_user_challenge_response(userpubkey, message, original_challenge) == 0)
{
// Challenge verification successful.