mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Warnings: Add missing overrides
This commit is contained in:
parent
6c32c4df87
commit
047448fbce
84 changed files with 630 additions and 627 deletions
|
|
@ -87,7 +87,7 @@ namespace CDBurnerHelpers
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
class AudioCDBurner::Pimpl : public ComBaseClassHelper <IDiscMasterProgressEvents>,
|
||||
class AudioCDBurner::Pimpl : public ComBaseClassHelper<IDiscMasterProgressEvents>,
|
||||
public Timer
|
||||
{
|
||||
public:
|
||||
|
|
@ -104,8 +104,6 @@ public:
|
|||
startTimer (2000);
|
||||
}
|
||||
|
||||
~Pimpl() {}
|
||||
|
||||
void releaseObjects()
|
||||
{
|
||||
discRecorder->Close();
|
||||
|
|
@ -116,7 +114,7 @@ public:
|
|||
Release();
|
||||
}
|
||||
|
||||
JUCE_COMRESULT QueryCancel (boolean* pbCancel)
|
||||
JUCE_COMRESULT QueryCancel (boolean* pbCancel) override
|
||||
{
|
||||
if (listener != nullptr && ! shouldCancel)
|
||||
shouldCancel = listener->audioCDBurnProgress (progress);
|
||||
|
|
@ -126,7 +124,7 @@ public:
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
JUCE_COMRESULT NotifyBlockProgress (long nCompleted, long nTotal)
|
||||
JUCE_COMRESULT NotifyBlockProgress (long nCompleted, long nTotal) override
|
||||
{
|
||||
progress = nCompleted / (float) nTotal;
|
||||
shouldCancel = listener != nullptr && listener->audioCDBurnProgress (progress);
|
||||
|
|
@ -134,13 +132,13 @@ public:
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
JUCE_COMRESULT NotifyPnPActivity (void) { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyAddProgress (long /*nCompletedSteps*/, long /*nTotalSteps*/) { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyTrackProgress (long /*nCurrentTrack*/, long /*nTotalTracks*/) { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyPreparingBurn (long /*nEstimatedSeconds*/) { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyClosingDisc (long /*nEstimatedSeconds*/) { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyBurnComplete (HRESULT /*status*/) { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyEraseComplete (HRESULT /*status*/) { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyPnPActivity (void) override { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyAddProgress (long /*nCompletedSteps*/, long /*nTotalSteps*/) override { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyTrackProgress (long /*nCurrentTrack*/, long /*nTotalTracks*/) override { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyPreparingBurn (long /*nEstimatedSeconds*/) override { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyClosingDisc (long /*nEstimatedSeconds*/) override { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyBurnComplete (HRESULT /*status*/) override { return E_NOTIMPL; }
|
||||
JUCE_COMRESULT NotifyEraseComplete (HRESULT /*status*/) override { return E_NOTIMPL; }
|
||||
|
||||
class ScopedDiscOpener
|
||||
{
|
||||
|
|
@ -173,30 +171,34 @@ public:
|
|||
return readOnlyDiskPresent;
|
||||
}
|
||||
|
||||
int getIntProperty (const LPOLESTR name, const int defaultReturn) const
|
||||
int getIntProperty (const wchar_t* name, const int defaultReturn) const
|
||||
{
|
||||
std::wstring copy { name };
|
||||
|
||||
ComSmartPtr<IPropertyStorage> prop;
|
||||
if (FAILED (discRecorder->GetRecorderProperties (prop.resetAndGetPointerAddress())))
|
||||
return defaultReturn;
|
||||
|
||||
PROPSPEC iPropSpec;
|
||||
iPropSpec.ulKind = PRSPEC_LPWSTR;
|
||||
iPropSpec.lpwstr = name;
|
||||
iPropSpec.lpwstr = copy.data();
|
||||
|
||||
PROPVARIANT iPropVariant;
|
||||
return FAILED (prop->ReadMultiple (1, &iPropSpec, &iPropVariant))
|
||||
? defaultReturn : (int) iPropVariant.lVal;
|
||||
}
|
||||
|
||||
bool setIntProperty (const LPOLESTR name, const int value) const
|
||||
bool setIntProperty (const wchar_t* name, const int value) const
|
||||
{
|
||||
std::wstring copy { name };
|
||||
|
||||
ComSmartPtr<IPropertyStorage> prop;
|
||||
if (FAILED (discRecorder->GetRecorderProperties (prop.resetAndGetPointerAddress())))
|
||||
return false;
|
||||
|
||||
PROPSPEC iPropSpec;
|
||||
iPropSpec.ulKind = PRSPEC_LPWSTR;
|
||||
iPropSpec.lpwstr = name;
|
||||
iPropSpec.lpwstr = copy.data();
|
||||
|
||||
PROPVARIANT iPropVariant;
|
||||
if (FAILED (prop->ReadMultiple (1, &iPropSpec, &iPropVariant)))
|
||||
|
|
@ -389,7 +391,7 @@ bool AudioCDBurner::addAudioTrack (AudioSource* audioSource, int numSamples)
|
|||
buffer.clear (bytesPerBlock);
|
||||
|
||||
AudioData::interleaveSamples (AudioData::NonInterleavedSource<AudioData::Float32, AudioData::NativeEndian> { sourceBuffer.getArrayOfReadPointers(), 2 },
|
||||
AudioData::InterleavedDest<AudioData::Int16, Audiodata::LittleEndian> { reinterpret_cast<uint16*> (buffer), 2 },
|
||||
AudioData::InterleavedDest<AudioData::Int16, AudioData::LittleEndian> { reinterpret_cast<uint16*> (buffer.get()), 2 },
|
||||
samplesPerBlock);
|
||||
|
||||
hr = pimpl->redbook->AddAudioTrackBlocks (buffer, bytesPerBlock);
|
||||
|
|
|
|||
|
|
@ -324,9 +324,9 @@ void findCDDevices (Array<CDDeviceDescription>& list)
|
|||
|
||||
if (h != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
char buffer[100] = { 0 };
|
||||
char buffer[100]{};
|
||||
|
||||
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER p = { 0 };
|
||||
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER p{};
|
||||
p.spt.Length = sizeof (SCSI_PASS_THROUGH);
|
||||
p.spt.CdbLength = 6;
|
||||
p.spt.SenseInfoLength = 24;
|
||||
|
|
@ -348,7 +348,7 @@ void findCDDevices (Array<CDDeviceDescription>& list)
|
|||
dev.scsiDriveLetter = driveLetter;
|
||||
dev.createDescription (buffer);
|
||||
|
||||
SCSI_ADDRESS scsiAddr = { 0 };
|
||||
SCSI_ADDRESS scsiAddr{};
|
||||
scsiAddr.Length = sizeof (scsiAddr);
|
||||
|
||||
if (DeviceIoControl (h, IOCTL_SCSI_GET_ADDRESS,
|
||||
|
|
@ -371,7 +371,7 @@ void findCDDevices (Array<CDDeviceDescription>& list)
|
|||
DWORD performScsiPassThroughCommand (SRB_ExecSCSICmd* const srb, const char driveLetter,
|
||||
HANDLE& deviceHandle, const bool retryOnFailure)
|
||||
{
|
||||
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER s = { 0 };
|
||||
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER s{};
|
||||
s.spt.Length = sizeof (SCSI_PASS_THROUGH);
|
||||
s.spt.CdbLength = srb->SRB_CDBLen;
|
||||
|
||||
|
|
@ -798,7 +798,7 @@ int CDController::getLastIndex()
|
|||
//==============================================================================
|
||||
bool CDDeviceHandle::readTOC (TOC* lpToc)
|
||||
{
|
||||
SRB_ExecSCSICmd s = { 0 };
|
||||
SRB_ExecSCSICmd s{};
|
||||
s.SRB_Cmd = SC_EXEC_SCSI_CMD;
|
||||
s.SRB_HaID = info.ha;
|
||||
s.SRB_Target = info.tgt;
|
||||
|
|
@ -872,7 +872,7 @@ void CDDeviceHandle::openDrawer (bool shouldBeOpen)
|
|||
}
|
||||
}
|
||||
|
||||
SRB_ExecSCSICmd s = { 0 };
|
||||
SRB_ExecSCSICmd s{};
|
||||
s.SRB_Cmd = SC_EXEC_SCSI_CMD;
|
||||
s.SRB_HaID = info.ha;
|
||||
s.SRB_Target = info.tgt;
|
||||
|
|
@ -1134,7 +1134,7 @@ bool AudioCDReader::readSamples (int* const* destSamples, int numDestChannels, i
|
|||
bool AudioCDReader::isCDStillPresent() const
|
||||
{
|
||||
using namespace CDReaderHelpers;
|
||||
TOC toc = { 0 };
|
||||
TOC toc{};
|
||||
return static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc);
|
||||
}
|
||||
|
||||
|
|
@ -1144,7 +1144,7 @@ void AudioCDReader::refreshTrackLengths()
|
|||
trackStartSamples.clear();
|
||||
zeromem (audioTracks, sizeof (audioTracks));
|
||||
|
||||
TOC toc = { 0 };
|
||||
TOC toc{};
|
||||
|
||||
if (static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue