1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-17 16:11:11 +02:00

Use type alias for pointer to BlockFile, which is still a dumb pointer

This commit is contained in:
Paul Licameli
2016-08-15 10:56:29 -04:00
parent dc7c4383fc
commit 2ede67be96
24 changed files with 151 additions and 131 deletions

View File

@@ -66,7 +66,6 @@ void ODComputeSummaryTask::DoSomeInternal()
return;
}
ODPCMAliasBlockFile* bf;
sampleCount blockStartSample = 0;
sampleCount blockEndSample = 0;
bool success =false;
@@ -74,7 +73,7 @@ void ODComputeSummaryTask::DoSomeInternal()
mBlockFilesMutex.Lock();
for(size_t i=0; i < mWaveTracks.size() && mBlockFiles.size();i++)
{
bf = mBlockFiles[0];
const auto &bf = mBlockFiles[0];
//first check to see if the ref count is at least 2. It should have one
//from when we added it to this instance's mBlockFiles array, and one from
@@ -202,7 +201,7 @@ void ODComputeSummaryTask::Update()
{
//if there is data but no summary, this blockfile needs summarizing.
SeqBlock &block = (*blocks)[i];
BlockFile *const file = block.f;
const auto &file = block.f;
if(file->IsDataAvailable() && !file->IsSummaryAvailable())
{
file->Ref();

View File

@@ -42,7 +42,6 @@ void ODDecodeTask::DoSomeInternal()
return;
}
ODDecodeBlockFile* bf;
ODFileDecoder* decoder;
sampleCount blockStartSample = 0;
sampleCount blockEndSample = 0;
@@ -50,7 +49,7 @@ void ODDecodeTask::DoSomeInternal()
for(size_t i=0; i < mWaveTracks.size() && mBlockFiles.size();i++)
{
bf = mBlockFiles[0];
const auto &bf = mBlockFiles[0];
int ret = 1;
@@ -64,7 +63,7 @@ void ODDecodeTask::DoSomeInternal()
//which the dirmanager::EnsureSafeFilename also does.
bf->LockRead();
//Get the decoder. If the file was moved, we need to create another one and init it.
decoder=GetOrCreateMatchingFileDecoder(bf);
decoder = GetOrCreateMatchingFileDecoder( &*bf );
if(!decoder->IsInitialized())
decoder->Init();
bf->SetODFileDecoder(decoder);