QCryptographicHash: make Private::method const
It never changes, making it const might improve code-gen. Change-Id: Ife8723e27ae9cf6cfcca48d58d46307003123354 Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
b3fbfcd373
commit
bd6d706b69
|
|
@ -141,7 +141,12 @@ QT_BEGIN_NAMESPACE
|
|||
class QCryptographicHashPrivate
|
||||
{
|
||||
public:
|
||||
QCryptographicHash::Algorithm method;
|
||||
explicit QCryptographicHashPrivate(QCryptographicHash::Algorithm method) noexcept
|
||||
: method(method)
|
||||
{
|
||||
}
|
||||
|
||||
const QCryptographicHash::Algorithm method;
|
||||
union {
|
||||
Sha1State sha1Context;
|
||||
#ifndef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
|
||||
|
|
@ -267,9 +272,8 @@ void QCryptographicHashPrivate::sha3Finish(int bitCount, Sha3Variant sha3Variant
|
|||
Constructs an object that can be used to create a cryptographic hash from data using \a method.
|
||||
*/
|
||||
QCryptographicHash::QCryptographicHash(Algorithm method)
|
||||
: d(new QCryptographicHashPrivate)
|
||||
: d(new QCryptographicHashPrivate{method})
|
||||
{
|
||||
d->method = method;
|
||||
reset();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue