@@ -291,7 +291,7 @@ public: | |||||
{ | { | ||||
IDirectSoundBuffer* pPrimaryBuffer; | IDirectSoundBuffer* pPrimaryBuffer; | ||||
DSBUFFERDESC primaryDesc = { 0 }; | |||||
DSBUFFERDESC primaryDesc = {}; | |||||
primaryDesc.dwSize = sizeof (DSBUFFERDESC); | primaryDesc.dwSize = sizeof (DSBUFFERDESC); | ||||
primaryDesc.dwFlags = 1 /* DSBCAPS_PRIMARYBUFFER */; | primaryDesc.dwFlags = 1 /* DSBCAPS_PRIMARYBUFFER */; | ||||
primaryDesc.dwBufferBytes = 0; | primaryDesc.dwBufferBytes = 0; | ||||
@@ -317,7 +317,7 @@ public: | |||||
if (SUCCEEDED (hr)) | if (SUCCEEDED (hr)) | ||||
{ | { | ||||
DSBUFFERDESC secondaryDesc = { 0 }; | |||||
DSBUFFERDESC secondaryDesc = {}; | |||||
secondaryDesc.dwSize = sizeof (DSBUFFERDESC); | secondaryDesc.dwSize = sizeof (DSBUFFERDESC); | ||||
secondaryDesc.dwFlags = 0x8000 /* DSBCAPS_GLOBALFOCUS */ | secondaryDesc.dwFlags = 0x8000 /* DSBCAPS_GLOBALFOCUS */ | ||||
| 0x10000 /* DSBCAPS_GETCURRENTPOSITION2 */; | | 0x10000 /* DSBCAPS_GETCURRENTPOSITION2 */; | ||||
@@ -598,7 +598,7 @@ public: | |||||
wfFormat.nAvgBytesPerSec = wfFormat.nSamplesPerSec * wfFormat.nBlockAlign; | wfFormat.nAvgBytesPerSec = wfFormat.nSamplesPerSec * wfFormat.nBlockAlign; | ||||
wfFormat.cbSize = 0; | wfFormat.cbSize = 0; | ||||
DSCBUFFERDESC captureDesc = { 0 }; | |||||
DSCBUFFERDESC captureDesc = {}; | |||||
captureDesc.dwSize = sizeof (DSCBUFFERDESC); | captureDesc.dwSize = sizeof (DSCBUFFERDESC); | ||||
captureDesc.dwFlags = 0; | captureDesc.dwFlags = 0; | ||||
captureDesc.dwBufferBytes = (DWORD) totalBytesPerBuffer; | captureDesc.dwBufferBytes = (DWORD) totalBytesPerBuffer; | ||||
@@ -450,7 +450,7 @@ private: | |||||
for (UINT i = 0; i < midiInGetNumDevs(); ++i) | for (UINT i = 0; i < midiInGetNumDevs(); ++i) | ||||
{ | { | ||||
MIDIINCAPS mc = { 0 }; | |||||
MIDIINCAPS mc = {}; | |||||
if (midiInGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) | if (midiInGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) | ||||
devices.add (mc); | devices.add (mc); | ||||
@@ -574,7 +574,7 @@ private: | |||||
{ | { | ||||
if (message.getRawDataSize() > 3 || message.isSysEx()) | if (message.getRawDataSize() > 3 || message.isSysEx()) | ||||
{ | { | ||||
MIDIHDR h = { 0 }; | |||||
MIDIHDR h = {}; | |||||
h.lpData = (char*) message.getRawData(); | h.lpData = (char*) message.getRawData(); | ||||
h.dwBytesRecorded = h.dwBufferLength = (DWORD) message.getRawDataSize(); | h.dwBytesRecorded = h.dwBufferLength = (DWORD) message.getRawDataSize(); | ||||
@@ -625,7 +625,7 @@ private: | |||||
for (UINT i = 0; i < midiOutGetNumDevs(); ++i) | for (UINT i = 0; i < midiOutGetNumDevs(); ++i) | ||||
{ | { | ||||
MIDIOUTCAPS mc = { 0 }; | |||||
MIDIOUTCAPS mc = {}; | |||||
if (midiOutGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) | if (midiOutGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) | ||||
devices.add (mc); | devices.add (mc); | ||||
@@ -34,6 +34,7 @@ namespace OggVorbisNamespace | |||||
"-Wshadow", | "-Wshadow", | ||||
"-Wfloat-conversion", | "-Wfloat-conversion", | ||||
"-Wdeprecated-register", | "-Wdeprecated-register", | ||||
"-Wdeprecated-declarations", | |||||
"-Wswitch-enum", | "-Wswitch-enum", | ||||
"-Wzero-as-null-pointer-constant", | "-Wzero-as-null-pointer-constant", | ||||
"-Wsign-conversion", | "-Wsign-conversion", | ||||
@@ -60,8 +60,10 @@ | |||||
namespace juce | namespace juce | ||||
{ | { | ||||
static inline bool arrayContainsPlugin (const OwnedArray<PluginDescription>& list, | |||||
const PluginDescription& desc) | |||||
#if JUCE_PLUGINHOST_VST || JUCE_PLUGINHOST_LADSPA | |||||
static bool arrayContainsPlugin (const OwnedArray<PluginDescription>& list, | |||||
const PluginDescription& desc) | |||||
{ | { | ||||
for (auto* p : list) | for (auto* p : list) | ||||
if (p->isDuplicateOf (desc)) | if (p->isDuplicateOf (desc)) | ||||
@@ -70,6 +72,8 @@ static inline bool arrayContainsPlugin (const OwnedArray<PluginDescription>& lis | |||||
return false; | return false; | ||||
} | } | ||||
#endif | |||||
#if JUCE_MAC || JUCE_IOS | #if JUCE_MAC || JUCE_IOS | ||||
#if JUCE_IOS | #if JUCE_IOS | ||||
@@ -147,7 +147,7 @@ namespace WindowsFileHelpers | |||||
Result getResultForLastError() | Result getResultForLastError() | ||||
{ | { | ||||
TCHAR messageBuffer[256] = { 0 }; | |||||
TCHAR messageBuffer[256] = {}; | |||||
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, | FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, | ||||
nullptr, GetLastError(), MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), | nullptr, GetLastError(), MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), | ||||
@@ -239,7 +239,7 @@ bool File::moveToTrash() const | |||||
doubleNullTermPath.calloc (numBytes, 1); | doubleNullTermPath.calloc (numBytes, 1); | ||||
fullPath.copyToUTF16 (doubleNullTermPath, numBytes); | fullPath.copyToUTF16 (doubleNullTermPath, numBytes); | ||||
SHFILEOPSTRUCT fos = { 0 }; | |||||
SHFILEOPSTRUCT fos = {}; | |||||
fos.wFunc = FO_DELETE; | fos.wFunc = FO_DELETE; | ||||
fos.pFrom = doubleNullTermPath; | fos.pFrom = doubleNullTermPath; | ||||
fos.fFlags = FOF_ALLOWUNDO | FOF_NOERRORUI | FOF_SILENT | FOF_NOCONFIRMATION | fos.fFlags = FOF_ALLOWUNDO | FOF_NOERRORUI | FOF_SILENT | FOF_NOCONFIRMATION | ||||
@@ -486,7 +486,7 @@ bool File::setFileTimesInternal (int64 modificationTime, int64 accessTime, int64 | |||||
//============================================================================== | //============================================================================== | ||||
void File::findFileSystemRoots (Array<File>& destArray) | void File::findFileSystemRoots (Array<File>& destArray) | ||||
{ | { | ||||
TCHAR buffer[2048] = { 0 }; | |||||
TCHAR buffer[2048] = {}; | |||||
GetLogicalDriveStrings (2048, buffer); | GetLogicalDriveStrings (2048, buffer); | ||||
const TCHAR* n = buffer; | const TCHAR* n = buffer; | ||||
@@ -277,7 +277,7 @@ private: | |||||
HeapBlock<TCHAR> file (fileNumChars), server (serverNumChars), | HeapBlock<TCHAR> file (fileNumChars), server (serverNumChars), | ||||
username (usernameNumChars), password (passwordNumChars); | username (usernameNumChars), password (passwordNumChars); | ||||
URL_COMPONENTS uc = { 0 }; | |||||
URL_COMPONENTS uc = {}; | |||||
uc.dwStructSize = sizeof (uc); | uc.dwStructSize = sizeof (uc); | ||||
uc.lpszUrlPath = file; | uc.lpszUrlPath = file; | ||||
uc.dwUrlPathLength = fileNumChars; | uc.dwUrlPathLength = fileNumChars; | ||||
@@ -393,7 +393,7 @@ private: | |||||
if (request != 0) | if (request != 0) | ||||
{ | { | ||||
INTERNET_BUFFERS buffers = { 0 }; | |||||
INTERNET_BUFFERS buffers = {}; | |||||
buffers.dwStructSize = sizeof (INTERNET_BUFFERS); | buffers.dwStructSize = sizeof (INTERNET_BUFFERS); | ||||
buffers.lpcszHeader = headers.toWideCharPointer(); | buffers.lpcszHeader = headers.toWideCharPointer(); | ||||
buffers.dwHeadersLength = (DWORD) headers.length(); | buffers.dwHeadersLength = (DWORD) headers.length(); | ||||
@@ -478,10 +478,10 @@ namespace MACAddressHelpers | |||||
if (NetbiosCall != 0) | if (NetbiosCall != 0) | ||||
{ | { | ||||
LANA_ENUM enums = { 0 }; | |||||
LANA_ENUM enums = {}; | |||||
{ | { | ||||
NCB ncb = { 0 }; | |||||
NCB ncb = {}; | |||||
ncb.ncb_command = NCBENUM; | ncb.ncb_command = NCBENUM; | ||||
ncb.ncb_buffer = (unsigned char*) &enums; | ncb.ncb_buffer = (unsigned char*) &enums; | ||||
ncb.ncb_length = sizeof (LANA_ENUM); | ncb.ncb_length = sizeof (LANA_ENUM); | ||||
@@ -490,13 +490,13 @@ namespace MACAddressHelpers | |||||
for (int i = 0; i < enums.length; ++i) | for (int i = 0; i < enums.length; ++i) | ||||
{ | { | ||||
NCB ncb2 = { 0 }; | |||||
NCB ncb2 = {}; | |||||
ncb2.ncb_command = NCBRESET; | ncb2.ncb_command = NCBRESET; | ||||
ncb2.ncb_lana_num = enums.lana[i]; | ncb2.ncb_lana_num = enums.lana[i]; | ||||
if (NetbiosCall (&ncb2) == 0) | if (NetbiosCall (&ncb2) == 0) | ||||
{ | { | ||||
NCB ncb = { 0 }; | |||||
NCB ncb = {}; | |||||
memcpy (ncb.ncb_callname, "* ", NCBNAMSZ); | memcpy (ncb.ncb_callname, "* ", NCBNAMSZ); | ||||
ncb.ncb_command = NCBASTAT; | ncb.ncb_command = NCBASTAT; | ||||
ncb.ncb_lana_num = enums.lana[i]; | ncb.ncb_lana_num = enums.lana[i]; | ||||
@@ -608,11 +608,11 @@ bool JUCE_CALLTYPE Process::openEmailWithAttachments (const String& targetEmailA | |||||
if (mapiSendMail == nullptr) | if (mapiSendMail == nullptr) | ||||
return false; | return false; | ||||
MapiMessage message = { 0 }; | |||||
MapiMessage message = {}; | |||||
message.lpszSubject = (LPSTR) emailSubject.toRawUTF8(); | message.lpszSubject = (LPSTR) emailSubject.toRawUTF8(); | ||||
message.lpszNoteText = (LPSTR) bodyText.toRawUTF8(); | message.lpszNoteText = (LPSTR) bodyText.toRawUTF8(); | ||||
MapiRecipDesc recip = { 0 }; | |||||
MapiRecipDesc recip = {}; | |||||
recip.ulRecipClass = MAPI_TO; | recip.ulRecipClass = MAPI_TO; | ||||
String targetEmailAddress_ (targetEmailAddress); | String targetEmailAddress_ (targetEmailAddress); | ||||
if (targetEmailAddress_.isEmpty()) | if (targetEmailAddress_.isEmpty()) | ||||
@@ -215,7 +215,7 @@ static DebugFlagsInitialiser debugFlagsInitialiser; | |||||
#else | #else | ||||
RTL_OSVERSIONINFOW getWindowsVersionInfo() | RTL_OSVERSIONINFOW getWindowsVersionInfo() | ||||
{ | { | ||||
RTL_OSVERSIONINFOW versionInfo = { 0 }; | |||||
RTL_OSVERSIONINFOW versionInfo = {}; | |||||
if (auto* moduleHandle = ::GetModuleHandleW (L"ntdll.dll")) | if (auto* moduleHandle = ::GetModuleHandleW (L"ntdll.dll")) | ||||
{ | { | ||||
@@ -227,7 +227,7 @@ static DebugFlagsInitialiser debugFlagsInitialiser; | |||||
LONG STATUS_SUCCESS = 0; | LONG STATUS_SUCCESS = 0; | ||||
if (rtlGetVersion (&versionInfo) != STATUS_SUCCESS) | if (rtlGetVersion (&versionInfo) != STATUS_SUCCESS) | ||||
versionInfo = { 0 }; | |||||
versionInfo = {}; | |||||
} | } | ||||
} | } | ||||
@@ -390,14 +390,14 @@ public: | |||||
ActiveProcess (const String& command, int streamFlags) | ActiveProcess (const String& command, int streamFlags) | ||||
: ok (false), readPipe (0), writePipe (0) | : ok (false), readPipe (0), writePipe (0) | ||||
{ | { | ||||
SECURITY_ATTRIBUTES securityAtts = { 0 }; | |||||
SECURITY_ATTRIBUTES securityAtts = {}; | |||||
securityAtts.nLength = sizeof (securityAtts); | securityAtts.nLength = sizeof (securityAtts); | ||||
securityAtts.bInheritHandle = TRUE; | securityAtts.bInheritHandle = TRUE; | ||||
if (CreatePipe (&readPipe, &writePipe, &securityAtts, 0) | if (CreatePipe (&readPipe, &writePipe, &securityAtts, 0) | ||||
&& SetHandleInformation (readPipe, HANDLE_FLAG_INHERIT, 0)) | && SetHandleInformation (readPipe, HANDLE_FLAG_INHERIT, 0)) | ||||
{ | { | ||||
STARTUPINFOW startupInfo = { 0 }; | |||||
STARTUPINFOW startupInfo = {}; | |||||
startupInfo.cb = sizeof (startupInfo); | startupInfo.cb = sizeof (startupInfo); | ||||
startupInfo.hStdOutput = (streamFlags & wantStdOut) != 0 ? writePipe : 0; | startupInfo.hStdOutput = (streamFlags & wantStdOut) != 0 ? writePipe : 0; | ||||
@@ -284,7 +284,7 @@ namespace SocketHelpers | |||||
{ | { | ||||
auto h = handle.load(); | auto h = handle.load(); | ||||
if (h == invalidSocket) | |||||
if (static_cast<SocketHandle> (h) == invalidSocket) | |||||
return true; | return true; | ||||
int opt; | int opt; | ||||
@@ -315,9 +315,9 @@ namespace SocketHelpers | |||||
fd_set rset, wset; | fd_set rset, wset; | ||||
FD_ZERO (&rset); | FD_ZERO (&rset); | ||||
FD_SET (h, &rset); | |||||
FD_SET (static_cast<SocketHandle> (h), &rset); | |||||
FD_ZERO (&wset); | FD_ZERO (&wset); | ||||
FD_SET (h, &wset); | |||||
FD_SET (static_cast<SocketHandle> (h), &wset); | |||||
fd_set* prset = forReading ? &rset : nullptr; | fd_set* prset = forReading ? &rset : nullptr; | ||||
fd_set* pwset = forReading ? nullptr : &wset; | fd_set* pwset = forReading ? nullptr : &wset; | ||||
@@ -813,7 +813,7 @@ struct SocketTests : public UnitTest | |||||
expect (socketServer.isConnected() == false); | expect (socketServer.isConnected() == false); | ||||
expect (socketServer.getHostName().isEmpty()); | expect (socketServer.getHostName().isEmpty()); | ||||
expect (socketServer.getBoundPort() == -1); | expect (socketServer.getBoundPort() == -1); | ||||
expect (socketServer.getRawSocketHandle() == invalidSocket); | |||||
expect (static_cast<SocketHandle> (socketServer.getRawSocketHandle()) == invalidSocket); | |||||
expect (socketServer.createListener (portNum, localHost.toString())); | expect (socketServer.createListener (portNum, localHost.toString())); | ||||
@@ -824,14 +824,14 @@ struct SocketTests : public UnitTest | |||||
expect (socket.isConnected() == true); | expect (socket.isConnected() == true); | ||||
expect (socket.getHostName() == localHost.toString()); | expect (socket.getHostName() == localHost.toString()); | ||||
expect (socket.getBoundPort() != -1); | expect (socket.getBoundPort() != -1); | ||||
expect (socket.getRawSocketHandle() != invalidSocket); | |||||
expect (static_cast<SocketHandle> (socket.getRawSocketHandle()) != invalidSocket); | |||||
socket.close(); | socket.close(); | ||||
expect (socket.isConnected() == false); | expect (socket.isConnected() == false); | ||||
expect (socket.getHostName().isEmpty()); | expect (socket.getHostName().isEmpty()); | ||||
expect (socket.getBoundPort() == -1); | expect (socket.getBoundPort() == -1); | ||||
expect (socket.getRawSocketHandle() == invalidSocket); | |||||
expect (static_cast<SocketHandle> (socket.getRawSocketHandle()) == invalidSocket); | |||||
} | } | ||||
beginTest ("DatagramSocket"); | beginTest ("DatagramSocket"); | ||||
@@ -839,17 +839,17 @@ struct SocketTests : public UnitTest | |||||
DatagramSocket socket; | DatagramSocket socket; | ||||
expect (socket.getBoundPort() == -1); | expect (socket.getBoundPort() == -1); | ||||
expect (socket.getRawSocketHandle() != invalidSocket); | |||||
expect (static_cast<SocketHandle> (socket.getRawSocketHandle()) != invalidSocket); | |||||
expect (socket.bindToPort (portNum, localHost.toString())); | expect (socket.bindToPort (portNum, localHost.toString())); | ||||
expect (socket.getBoundPort() == portNum); | expect (socket.getBoundPort() == portNum); | ||||
expect (socket.getRawSocketHandle() != invalidSocket); | |||||
expect (static_cast<SocketHandle> (socket.getRawSocketHandle()) != invalidSocket); | |||||
socket.shutdown(); | socket.shutdown(); | ||||
expect (socket.getBoundPort() == -1); | expect (socket.getBoundPort() == -1); | ||||
expect (socket.getRawSocketHandle() == invalidSocket); | |||||
expect (static_cast<SocketHandle> (socket.getRawSocketHandle()) == invalidSocket); | |||||
} | } | ||||
} | } | ||||
}; | }; | ||||
@@ -1847,11 +1847,16 @@ String String::formattedRaw (const char* pf, ...) | |||||
HeapBlock<wchar_t> temp (bufferSize); | HeapBlock<wchar_t> temp (bufferSize); | ||||
const int num = (int) | const int num = (int) | ||||
#if JUCE_WINDOWS | #if JUCE_WINDOWS | ||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") | |||||
_vsnwprintf | _vsnwprintf | ||||
#else | #else | ||||
vswprintf | vswprintf | ||||
#endif | #endif | ||||
(temp.get(), bufferSize - 1, wideCharVersion.toWideCharPointer(), args); | (temp.get(), bufferSize - 1, wideCharVersion.toWideCharPointer(), args); | ||||
#if JUCE_WINDOWS | |||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE | |||||
#endif | |||||
#endif | #endif | ||||
va_end (args); | va_end (args); | ||||
@@ -373,7 +373,7 @@ public: | |||||
expect (ByteOrder::swap ((uint16) 0x1122) == 0x2211); | expect (ByteOrder::swap ((uint16) 0x1122) == 0x2211); | ||||
expect (ByteOrder::swap ((uint32) 0x11223344) == 0x44332211); | expect (ByteOrder::swap ((uint32) 0x11223344) == 0x44332211); | ||||
expect (ByteOrder::swap ((uint64) 0x1122334455667788ULL) == 0x8877665544332211LL); | |||||
expect (ByteOrder::swap ((uint64) 0x1122334455667788ULL) == (uint64) 0x8877665544332211LL); | |||||
beginTest ("Atomic int"); | beginTest ("Atomic int"); | ||||
AtomicTester <int>::testInteger (*this); | AtomicTester <int>::testInteger (*this); | ||||
@@ -34,7 +34,7 @@ public: | |||||
HMODULE moduleHandle = (HMODULE) Process::getCurrentModuleInstanceHandle(); | HMODULE moduleHandle = (HMODULE) Process::getCurrentModuleInstanceHandle(); | ||||
WNDCLASSEX wc = { 0 }; | |||||
WNDCLASSEX wc = {}; | |||||
wc.cbSize = sizeof (wc); | wc.cbSize = sizeof (wc); | ||||
wc.lpfnWndProc = wndProc; | wc.lpfnWndProc = wndProc; | ||||
wc.cbWndExtra = 4; | wc.cbWndExtra = 4; | ||||
@@ -30,6 +30,7 @@ namespace jpeglibNamespace | |||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion", | JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion", | ||||
"-Wdeprecated-register", | "-Wdeprecated-register", | ||||
"-Wdeprecated-declarations", | |||||
"-Wsign-conversion", | "-Wsign-conversion", | ||||
"-Wcast-align", | "-Wcast-align", | ||||
"-Wswitch-enum", | "-Wswitch-enum", | ||||
@@ -51,6 +51,7 @@ namespace pnglibNamespace | |||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wsign-conversion", | JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wsign-conversion", | ||||
"-Wimplicit-fallthrough", | "-Wimplicit-fallthrough", | ||||
"-Wtautological-constant-out-of-range-compare", | |||||
"-Wzero-as-null-pointer-constant", | "-Wzero-as-null-pointer-constant", | ||||
"-Wcomma") | "-Wcomma") | ||||
@@ -89,12 +89,12 @@ namespace TTFNameExtractor | |||||
{ | { | ||||
input.setPosition (directoryOffset); | input.setPosition (directoryOffset); | ||||
NamingTable namingTable = { 0 }; | |||||
NamingTable namingTable = {}; | |||||
input.read (&namingTable, sizeof (namingTable)); | input.read (&namingTable, sizeof (namingTable)); | ||||
for (int i = 0; i < (int) ByteOrder::swapIfLittleEndian (namingTable.numberOfNameRecords); ++i) | for (int i = 0; i < (int) ByteOrder::swapIfLittleEndian (namingTable.numberOfNameRecords); ++i) | ||||
{ | { | ||||
NameRecord nameRecord = { 0 }; | |||||
NameRecord nameRecord = {}; | |||||
input.read (&nameRecord, sizeof (nameRecord)); | input.read (&nameRecord, sizeof (nameRecord)); | ||||
if (ByteOrder::swapIfLittleEndian (nameRecord.nameID) == 4) | if (ByteOrder::swapIfLittleEndian (nameRecord.nameID) == 4) | ||||
@@ -112,7 +112,7 @@ namespace TTFNameExtractor | |||||
static String getTypefaceNameFromFile (MemoryInputStream& input) | static String getTypefaceNameFromFile (MemoryInputStream& input) | ||||
{ | { | ||||
OffsetTable offsetTable = { 0 }; | |||||
OffsetTable offsetTable = {}; | |||||
input.read (&offsetTable, sizeof (offsetTable)); | input.read (&offsetTable, sizeof (offsetTable)); | ||||
for (int i = 0; i < (int) ByteOrder::swapIfLittleEndian (offsetTable.numTables); ++i) | for (int i = 0; i < (int) ByteOrder::swapIfLittleEndian (offsetTable.numTables); ++i) | ||||
@@ -146,7 +146,7 @@ namespace FontEnumerators | |||||
{ | { | ||||
if (lpelfe != nullptr && (type & RASTER_FONTTYPE) == 0) | if (lpelfe != nullptr && (type & RASTER_FONTTYPE) == 0) | ||||
{ | { | ||||
LOGFONTW lf = { 0 }; | |||||
LOGFONTW lf = {}; | |||||
lf.lfWeight = FW_DONTCARE; | lf.lfWeight = FW_DONTCARE; | ||||
lf.lfOutPrecision = OUT_OUTLINE_PRECIS; | lf.lfOutPrecision = OUT_OUTLINE_PRECIS; | ||||
lf.lfQuality = DEFAULT_QUALITY; | lf.lfQuality = DEFAULT_QUALITY; | ||||
@@ -193,7 +193,7 @@ StringArray Font::findAllTypefaceNames() | |||||
auto dc = CreateCompatibleDC (0); | auto dc = CreateCompatibleDC (0); | ||||
{ | { | ||||
LOGFONTW lf = { 0 }; | |||||
LOGFONTW lf = {}; | |||||
lf.lfWeight = FW_DONTCARE; | lf.lfWeight = FW_DONTCARE; | ||||
lf.lfOutPrecision = OUT_OUTLINE_PRECIS; | lf.lfOutPrecision = OUT_OUTLINE_PRECIS; | ||||
lf.lfQuality = DEFAULT_QUALITY; | lf.lfQuality = DEFAULT_QUALITY; | ||||
@@ -473,7 +473,7 @@ private: | |||||
SetMapperFlags (dc, 0); | SetMapperFlags (dc, 0); | ||||
SetMapMode (dc, MM_TEXT); | SetMapMode (dc, MM_TEXT); | ||||
LOGFONTW lf = { 0 }; | |||||
LOGFONTW lf = {}; | |||||
lf.lfCharSet = DEFAULT_CHARSET; | lf.lfCharSet = DEFAULT_CHARSET; | ||||
lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; | lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; | ||||
lf.lfOutPrecision = OUT_OUTLINE_PRECIS; | lf.lfOutPrecision = OUT_OUTLINE_PRECIS; | ||||
@@ -168,7 +168,7 @@ private: | |||||
if (selectsDirectories) | if (selectsDirectories) | ||||
{ | { | ||||
BROWSEINFO bi = { 0 }; | |||||
BROWSEINFO bi = {}; | |||||
bi.hwndOwner = (HWND) (async ? nullptr : owner->getWindowHandle()); | bi.hwndOwner = (HWND) (async ? nullptr : owner->getWindowHandle()); | ||||
bi.pszDisplayName = files; | bi.pszDisplayName = files; | ||||
bi.lpszTitle = title.toWideCharPointer(); | bi.lpszTitle = title.toWideCharPointer(); | ||||
@@ -205,7 +205,7 @@ private: | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
OPENFILENAMEW of = { 0 }; | |||||
OPENFILENAMEW of = {}; | |||||
#ifdef OPENFILENAME_SIZE_VERSION_400W | #ifdef OPENFILENAME_SIZE_VERSION_400W | ||||
of.lStructSize = OPENFILENAME_SIZE_VERSION_400W; | of.lStructSize = OPENFILENAME_SIZE_VERSION_400W; | ||||
@@ -940,7 +940,7 @@ namespace IconConverters | |||||
{ | { | ||||
if (auto* dc = ::CreateCompatibleDC (tempDC)) | if (auto* dc = ::CreateCompatibleDC (tempDC)) | ||||
{ | { | ||||
BITMAPV5HEADER header = { 0 }; | |||||
BITMAPV5HEADER header = {}; | |||||
header.bV5Size = sizeof (BITMAPV5HEADER); | header.bV5Size = sizeof (BITMAPV5HEADER); | ||||
header.bV5Width = bm.bmWidth; | header.bV5Width = bm.bmWidth; | ||||
header.bV5Height = -bm.bmHeight; | header.bV5Height = -bm.bmHeight; | ||||
@@ -1970,11 +1970,11 @@ private: | |||||
auto moduleHandle = (HINSTANCE) Process::getCurrentModuleInstanceHandle(); | auto moduleHandle = (HINSTANCE) Process::getCurrentModuleInstanceHandle(); | ||||
TCHAR moduleFile[1024] = { 0 }; | |||||
TCHAR moduleFile[1024] = {}; | |||||
GetModuleFileName (moduleHandle, moduleFile, 1024); | GetModuleFileName (moduleHandle, moduleFile, 1024); | ||||
WORD iconNum = 0; | WORD iconNum = 0; | ||||
WNDCLASSEX wcex = { 0 }; | |||||
WNDCLASSEX wcex = {}; | |||||
wcex.cbSize = sizeof (wcex); | wcex.cbSize = sizeof (wcex); | ||||
wcex.style = CS_OWNDC; | wcex.style = CS_OWNDC; | ||||
wcex.lpfnWndProc = (WNDPROC) windowProc; | wcex.lpfnWndProc = (WNDPROC) windowProc; | ||||
@@ -4361,7 +4361,7 @@ public: | |||||
{ | { | ||||
if (Process::isForegroundProcess()) | if (Process::isForegroundProcess()) | ||||
{ | { | ||||
INPUT input = { 0 }; | |||||
INPUT input = {}; | |||||
input.type = INPUT_MOUSE; | input.type = INPUT_MOUSE; | ||||
input.mi.mouseData = MOUSEEVENTF_MOVE; | input.mi.mouseData = MOUSEEVENTF_MOVE; | ||||
@@ -4516,7 +4516,7 @@ struct MonitorInfo | |||||
static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT r, LPARAM userInfo) | static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT r, LPARAM userInfo) | ||||
{ | { | ||||
MONITORINFO info = { 0 }; | |||||
MONITORINFO info = {}; | |||||
info.cbSize = sizeof (info); | info.cbSize = sizeof (info); | ||||
GetMonitorInfo (hm, &info); | GetMonitorInfo (hm, &info); | ||||
@@ -211,6 +211,8 @@ public: | |||||
} | } | ||||
} | } | ||||
using ActiveXControlComponent::focusGained; | |||||
void setWebViewSize (int width, int height) override | void setWebViewSize (int width, int height) override | ||||
{ | { | ||||
setSize (width, height); | setSize (width, height); | ||||
@@ -106,7 +106,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster | |||||
return; | return; | ||||
{ | { | ||||
AM_MEDIA_TYPE mt = { 0 }; | |||||
AM_MEDIA_TYPE mt = {}; | |||||
mt.majortype = MEDIATYPE_Video; | mt.majortype = MEDIATYPE_Video; | ||||
mt.subtype = MEDIASUBTYPE_RGB24; | mt.subtype = MEDIASUBTYPE_RGB24; | ||||
mt.formattype = FORMAT_VideoInfo; | mt.formattype = FORMAT_VideoInfo; | ||||
@@ -130,7 +130,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster | |||||
if (FAILED (hr)) | if (FAILED (hr)) | ||||
return; | return; | ||||
AM_MEDIA_TYPE mt = { 0 }; | |||||
AM_MEDIA_TYPE mt = {}; | |||||
hr = sampleGrabber->GetConnectedMediaType (&mt); | hr = sampleGrabber->GetConnectedMediaType (&mt); | ||||
VIDEOINFOHEADER* pVih = (VIDEOINFOHEADER*) (mt.pbFormat); | VIDEOINFOHEADER* pVih = (VIDEOINFOHEADER*) (mt.pbFormat); | ||||
width = pVih->bmiHeader.biWidth; | width = pVih->bmiHeader.biWidth; | ||||
@@ -687,7 +687,7 @@ private: | |||||
if (wantedDirection == dir) | if (wantedDirection == dir) | ||||
{ | { | ||||
PIN_INFO info = { 0 }; | |||||
PIN_INFO info = {}; | |||||
pin->QueryPinInfo (&info); | pin->QueryPinInfo (&info); | ||||
if (pinName == nullptr || String (pinName).equalsIgnoreCase (String (info.achName))) | if (pinName == nullptr || String (pinName).equalsIgnoreCase (String (info.achName))) | ||||
@@ -847,10 +847,10 @@ private: | |||||
HINSTANCE moduleHandle = (HINSTANCE) Process::getCurrentModuleInstanceHandle(); | HINSTANCE moduleHandle = (HINSTANCE) Process::getCurrentModuleInstanceHandle(); | ||||
TCHAR moduleFile [1024] = { 0 }; | |||||
TCHAR moduleFile [1024] = {}; | |||||
GetModuleFileName (moduleHandle, moduleFile, 1024); | GetModuleFileName (moduleHandle, moduleFile, 1024); | ||||
WNDCLASSEX wcex = { 0 }; | |||||
WNDCLASSEX wcex = {}; | |||||
wcex.cbSize = sizeof (wcex); | wcex.cbSize = sizeof (wcex); | ||||
wcex.style = CS_OWNDC; | wcex.style = CS_OWNDC; | ||||
wcex.lpfnWndProc = (WNDPROC) wndProc; | wcex.lpfnWndProc = (WNDPROC) wndProc; | ||||