From b18dfada9a769d6c7bb4a61077ae7f76c3ac26ad Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 24 Apr 2012 19:12:54 -0700 Subject: [PATCH] Save an unnecessary copy or two. --- src/rfc1751.cpp | 4 ++-- src/rfc1751.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rfc1751.cpp b/src/rfc1751.cpp index 28f7a274a4..edfb6d7d5e 100644 --- a/src/rfc1751.cpp +++ b/src/rfc1751.cpp @@ -424,7 +424,7 @@ static int etob(std::string& strData, std::vector vsHuman) // 0 if word not in dictionary // -1 if badly formed string // -2 if words are okay but parity is wrong. -int eng2key(std::string& strKey, const std::string strHuman) +int eng2key(std::string& strKey, const std::string& strHuman) { std::vector vWords; std::string strFirst, strSecond; @@ -452,7 +452,7 @@ int eng2key(std::string& strKey, const std::string strHuman) } // key2eng() given a 128 bit key in big-endian format, convert to human. -void key2eng(std::string& strHuman, const std::string strKey) +void key2eng(std::string& strHuman, const std::string& strKey) { std::string strFirst, strSecond; diff --git a/src/rfc1751.h b/src/rfc1751.h index 047ee1ea33..1d27f5e8c6 100644 --- a/src/rfc1751.h +++ b/src/rfc1751.h @@ -1,7 +1,7 @@ #ifndef _RFC_1751_ #define _RFC_1751_ -int eng2key(std::string& strKey, const std::string strHuman); -void key2eng(std::string& strHuman, const std::string strKey); +int eng2key(std::string& strKey, const std::string& strHuman); +void key2eng(std::string& strHuman, const std::string& strKey); #endif