diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2014-04-04 21:25:33 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2014-04-04 21:25:33 (GMT) |
commit | 539b6c58f5d9fa9487f8d831f11320517e4dae47 (patch) | |
tree | 3649f66d65208c1397abe0f1e1e1ccbcff6ef1af /Source/cmCryptoHash.cxx | |
parent | a02c30c29407f30bce654be60da91cf84e2cb4f1 (diff) | |
download | CMake-539b6c58f5d9fa9487f8d831f11320517e4dae47.zip CMake-539b6c58f5d9fa9487f8d831f11320517e4dae47.tar.gz CMake-539b6c58f5d9fa9487f8d831f11320517e4dae47.tar.bz2 |
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).
Diffstat (limited to 'Source/cmCryptoHash.cxx')
-rw-r--r-- | Source/cmCryptoHash.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index 0d3c6bb..74e17b6 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -38,7 +38,7 @@ cmsys::auto_ptr<cmCryptoHash> cmCryptoHash::New(const char* algo) std::string cmCryptoHash::HashString(const std::string& input) { 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())); return this->Finalize(); } |