Editor code: tidy up BOOLs,NULLs and overrides pt4.

A few 'typedefs' replaced by 'using's
This shouldn't have any functional changes at all, just c++17 modernization
It's a part 4 of a split #2847

Signed-off-by: Nemerle <nemerle5+git@gmail.com>
This commit is contained in:
Nemerle
2021-08-05 16:49:02 +02:00
parent 7404622b48
commit 1a80d313e5
36 changed files with 204 additions and 204 deletions
+6 -6
View File
@@ -359,7 +359,7 @@ inline QString TokenizeString(const QString& s, LPCSTR pszTokens, int& iStart)
QByteArray str = s.toUtf8();
if (pszTokens == NULL)
if (pszTokens == nullptr)
{
return str;
}
@@ -472,7 +472,7 @@ inline const char* strstri(const char* pString, const char* pSubstring)
}
}
return NULL;
return nullptr;
}
@@ -542,7 +542,7 @@ public:
// There is a bug in QT with writing files larger than 32MB. It separates
// the write into 32MB blocks, but doesn't write the last block correctly.
// To deal with this, we'll separate into blocks here so QT doesn't have to.
// QT bug in qfileengine_win.cpp line 434. Block size is calculated once and always
// used as the amount of data to write, but for the last block, unless there is exactly
// block size left to write, the actual remaining amount needs to be written, not the
@@ -658,14 +658,14 @@ inline CArchive& operator>>(CArchive& ar, QString& str)
str = QString::fromUtf16(reinterpret_cast<ushort*>(raw), aznumeric_cast<int>(length));
}
}
return ar;
}
inline CArchive& operator<<(CArchive& ar, const QString& str)
{
// This is written to mimic how MFC archiving worked, which was to
// write markers to indicate the size of the length -
// write markers to indicate the size of the length -
// so a length that will fit into 8 bits takes 8 bits.
// A length that requires more than 8 bits, puts an 8 bit marker (0xff)
// to indicate that the length is greater, then 16 bits for the length.
@@ -693,7 +693,7 @@ inline CArchive& operator<<(CArchive& ar, const QString& str)
ar << static_cast<quint16>(0xffff);
ar << static_cast<quint32>(length);
}
ar.device()->write(data);
return ar;