Fix build on AIX failing because of access to string elements
The compilation failed with this error message: .../Source/cmCryptoHash.cxx: In method `string cmCryptoHash::HashString (const string &)': .../Source/cmCryptoHash.cxx:41: non-lvalue in unary `&' This was introduced in 77f60392d93f41a8828d3db1d7b76d45f1535d07 (stringapi: Accept strings when MD5 hashing data).
This commit is contained in:
parent
a02c30c294
commit
539b6c58f5
@ -38,7 +38,7 @@ cmsys::auto_ptr<cmCryptoHash> cmCryptoHash::New(const char* algo)
|
|||||||
std::string cmCryptoHash::HashString(const std::string& input)
|
std::string cmCryptoHash::HashString(const std::string& input)
|
||||||
{
|
{
|
||||||
this->Initialize();
|
this->Initialize();
|
||||||
this->Append(reinterpret_cast<unsigned char const*>(&input[0]),
|
this->Append(reinterpret_cast<unsigned char const*>(input.c_str()),
|
||||||
static_cast<int>(input.size()));
|
static_cast<int>(input.size()));
|
||||||
return this->Finalize();
|
return this->Finalize();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user