Remove some misplaced sizeof() scalings on array sizes for new[]
Noticed during review of clang-tidy warnings. I have searched the source tree (using grep) and only this one file contains examples of this mistake. Change-Id: I3bbcec736e5a184db7251962fd3671a21ab5d238 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
parent
179c88a1a9
commit
5cc5b43d0f
@ -210,7 +210,7 @@ void QWindowsPrintDevice::loadPageSizes() const
|
||||
&& DeviceCapabilities((LPWSTR)m_id.utf16(), NULL, DC_PAPERS, NULL, NULL) == paperCount) {
|
||||
|
||||
QScopedArrayPointer<wchar_t> paperNames(new wchar_t[paperCount*64]);
|
||||
QScopedArrayPointer<POINT> winSizes(new POINT[paperCount*sizeof(POINT)]);
|
||||
QScopedArrayPointer<POINT> winSizes(new POINT[paperCount]);
|
||||
QScopedArrayPointer<wchar_t> papers(new wchar_t[paperCount]);
|
||||
|
||||
// Get the details and match the default paper size
|
||||
@ -356,7 +356,7 @@ void QWindowsPrintDevice::loadInputSlots() const
|
||||
if (int(binCount) > 0
|
||||
&& DeviceCapabilities(printerId, nullptr, DC_BINNAMES, nullptr, nullptr) == binCount) {
|
||||
|
||||
QScopedArrayPointer<WORD> bins(new WORD[binCount*sizeof(WORD)]);
|
||||
QScopedArrayPointer<WORD> bins(new WORD[binCount]);
|
||||
QScopedArrayPointer<wchar_t> binNames(new wchar_t[binCount*24]);
|
||||
|
||||
// Get the details and match the default paper size
|
||||
|
Loading…
Reference in New Issue
Block a user