Fix compile on early Apple platforms.

I think this may be related to the VectorSource check-in. The error is:

algparam.h: In constructor 'ConstByteArrayParameter::ConstByteArrayParameter(const T&, bool) [with T = std::vector<byte, std::allocator<byte> >]':
filters.h:1444:   instantiated from here
algparam.h:56: error: 'const class std::vector<byte, std::allocator<byte> >' has no member named 'data'
This commit is contained in:
Jeffrey Walton 2018-11-03 20:00:29 -04:00
parent a4d97e9bf8
commit f7c0fab5b2
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -53,7 +53,7 @@ public:
: m_deepCopy(false), m_data(NULLPTR), m_size(0)
{
CRYPTOPP_COMPILE_ASSERT(sizeof(typename T::value_type) == 1);
Assign(reinterpret_cast<const byte *>(string.data()), string.size(), deepCopy);
Assign(reinterpret_cast<const byte *>(&string[0]), string.size(), deepCopy);
}
/// \brief Assign contents from a memory buffer