1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 14:18:53 +02:00

Last loose ends in removal of all naked scalar new

This commit is contained in:
Paul Licameli 2017-03-09 09:45:55 -05:00
commit a74ea83332
9 changed files with 21 additions and 15 deletions

View File

@ -171,7 +171,7 @@ static int RecursivelyEnumerate(wxString dirPath,
if(dir.IsOpened()){
wxString name;
// Don't delete files from a selective top level, e.g. if handed "projects*" as the
// Don't DELETE files from a selective top level, e.g. if handed "projects*" as the
// directory specifier.
if (bFiles && dirspec.IsEmpty() ){
cont= dir.GetFirst(&name, filespec, wxDIR_FILES | wxDIR_HIDDEN | wxDIR_NO_FOLLOW);
@ -426,7 +426,7 @@ DirManager::~DirManager()
// static
// This is quite a dangerous function. In the temp dir it will delete every directory
// This is quite a dangerous function. In the temp dir it will DELETE every directory
// recursively, that has 'project*' as the name - EVEN if it happens not to be an Audacity
// project but just something else called project.
void DirManager::CleanTempDir()

View File

@ -759,7 +759,7 @@ void GetNextWindowPlacement(wxRect *nextRect, bool *pMaximized, bool *pIconized)
}
// ELSE a subsequent new window. It will NOT straddle screens.
// ELSE a subsequent NEW window. It will NOT straddle screens.
// We don't mind being 32 pixels off the screen in any direction.
// Make sure initial sizes (pretty much) fit within the display bounds

View File

@ -128,8 +128,8 @@ void UndoManager::CalculateSpaceUsage()
// contains it.
// Why the last and not the first? Because the user of the History dialog
// may delete undo states, oldest first. To reclaim disk space you must
// delete all states containing the block file. So the block file's
// may DELETE undo states, oldest first. To reclaim disk space you must
// DELETE all states containing the block file. So the block file's
// contribution to space usage should be counted only in that latest state.
for (size_t nn = stack.size(); nn--;)

View File

@ -1090,16 +1090,16 @@ void SpecCache::Populate
// Storage for mutable per-thread data.
// private clause ensures one copy per thread
struct ThreadLocalStorage {
ThreadLocalStorage() { cache = nullptr; }
~ThreadLocalStorage() { delete cache; }
ThreadLocalStorage() { }
~ThreadLocalStorage() { }
void init(WaveTrackCache &waveTrackCache, size_t scratchSize) {
if (!cache) {
cache = new WaveTrackCache(waveTrackCache.GetTrack());
cache = std::make_unique<WaveTrackCache>(waveTrackCache.GetTrack());
scratch.resize(scratchSize);
}
}
WaveTrackCache* cache;
std::unique_ptr<WaveTrackCache> cache;
std::vector<float> scratch;
} tls;

View File

@ -29,7 +29,7 @@ void ComputeLegacySummaryInfo(const wxFileName &fileName,
// Audacity BlockFile formats (versions 0.98 through 1.0, or
// versions 1.1.0 through 1.1.2). You can load a BlockFile
// in this format, and you can save information about it
// back to disk, but you can't create a NEW one from new
// back to disk, but you can't create a NEW one from NEW
// sample data.
//
class LegacyBlockFile final : public BlockFile {

View File

@ -21,7 +21,9 @@
**********************************************************************/
#include "../../Audacity.h"
#include "VSTControl.h"
#include "../../MemoryX.h"
@interface VSTView : NSView
{
@ -90,7 +92,8 @@ bool VSTControl::Create(wxWindow *parent, VSTEffectLink *link)
[mVSTView init];
[mVSTView retain];
SetPeer(new VSTControlImpl(this, mVSTView));
// wxWidgets takes ownership so safenew
SetPeer(safenew VSTControlImpl(this, mVSTView));
CreateCocoa();

View File

@ -21,6 +21,7 @@
**********************************************************************/
#include "../../Audacity.h"
#include <AudioUnit/AudioUnit.h>
#include <AudioUnit/AudioComponent.h>
#include <AudioUnit/AudioUnitProperties.h>
@ -32,6 +33,7 @@
#endif
#include "AUControl.h"
#include "../../MemoryX.h"
@interface AUView : NSView
{
@ -173,7 +175,8 @@ bool AUControl::Create(wxWindow *parent, AudioComponent comp, AudioUnit unit, bo
return false;
}
SetPeer(new AUControlImpl(this, mAUView));
// wxWidgets takes ownership so safenew
SetPeer(safenew AUControlImpl(this, mAUView));
if (mHIView)
{
@ -651,7 +654,7 @@ void AUControl::CarbonViewResized()
// Set the dialog size
w->SetSize(size);
// And finally set the new max/min
// And finally set the NEW max/min
w->SetSizeHints(size, size);
mLastMin = wxSize(rect.size.width, rect.size.height);

View File

@ -1068,7 +1068,7 @@ void ProgressDialog::Init()
#endif
}
// Add a new text column each time this is called.
// Add a NEW text column each time this is called.
void ProgressDialog::AddMessageAsColumn(wxBoxSizer * pSizer, const wxString & sText, bool bFirstColumn) {
// Assuming that we don't want empty columns, bail out if there is no text.

View File

@ -78,7 +78,7 @@ public:
ProgressResult Update(int current, int total, const wxString & message = wxEmptyString);
void SetMessage(const wxString & message);
// 'ETB' character to indicate a new column in the message text.
// 'ETB' character to indicate a NEW column in the message text.
static const wxChar ColoumnSplitMarker = (char)23;
protected: