mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-19 12:14:37 -04:00
Coding style improvements.
This commit is contained in:
parent
924130e0fe
commit
a407e0082b
16 changed files with 42 additions and 42 deletions
|
@ -22,7 +22,7 @@
|
|||
#include "core/Endian.h"
|
||||
#include "crypto/CryptoHash.h"
|
||||
|
||||
const QSysInfo::Endian HashedBlockStream::BYTEORDER = QSysInfo::LittleEndian;
|
||||
const QSysInfo::Endian HashedBlockStream::ByteOrder = QSysInfo::LittleEndian;
|
||||
|
||||
HashedBlockStream::HashedBlockStream(QIODevice* baseDevice)
|
||||
: LayeredStream(baseDevice)
|
||||
|
@ -126,7 +126,7 @@ bool HashedBlockStream::readHashedBlock()
|
|||
{
|
||||
bool ok;
|
||||
|
||||
quint32 index = Endian::readUInt32(m_baseDevice, BYTEORDER, &ok);
|
||||
quint32 index = Endian::readUInt32(m_baseDevice, ByteOrder, &ok);
|
||||
if (!ok || index != m_blockIndex) {
|
||||
m_error = true;
|
||||
return false;
|
||||
|
@ -138,7 +138,7 @@ bool HashedBlockStream::readHashedBlock()
|
|||
return false;
|
||||
}
|
||||
|
||||
m_blockSize = Endian::readInt32(m_baseDevice, BYTEORDER, &ok);
|
||||
m_blockSize = Endian::readInt32(m_baseDevice, ByteOrder, &ok);
|
||||
if (!ok || m_blockSize < 0) {
|
||||
m_error = true;
|
||||
return false;
|
||||
|
@ -207,7 +207,7 @@ qint64 HashedBlockStream::writeData(const char* data, qint64 maxSize)
|
|||
|
||||
bool HashedBlockStream::writeHashedBlock()
|
||||
{
|
||||
if (!Endian::writeInt32(m_blockIndex, m_baseDevice, BYTEORDER)) {
|
||||
if (!Endian::writeInt32(m_blockIndex, m_baseDevice, ByteOrder)) {
|
||||
m_error = true;
|
||||
return false;
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ bool HashedBlockStream::writeHashedBlock()
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!Endian::writeInt32(m_buffer.size(), m_baseDevice, BYTEORDER)) {
|
||||
if (!Endian::writeInt32(m_buffer.size(), m_baseDevice, ByteOrder)) {
|
||||
m_error = true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ private:
|
|||
bool readHashedBlock();
|
||||
bool writeHashedBlock();
|
||||
|
||||
static const QSysInfo::Endian BYTEORDER;
|
||||
static const QSysInfo::Endian ByteOrder;
|
||||
qint32 m_blockSize;
|
||||
QByteArray m_buffer;
|
||||
int m_bufferPos;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue