Save an unnecessary copy or two.

This commit is contained in:
JoelKatz
2012-04-24 19:12:54 -07:00
parent 8eaff48c19
commit b18dfada9a
2 changed files with 4 additions and 4 deletions

View File

@@ -424,7 +424,7 @@ static int etob(std::string& strData, std::vector<std::string> 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<std::string> 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;

View File

@@ -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