1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 08:09:41 +02:00

Merge branch 'master' into antifrag2

This commit is contained in:
Paul Licameli 2016-02-19 10:48:32 -05:00
commit ca53b191b1
6 changed files with 14 additions and 9 deletions

View File

@ -28,8 +28,8 @@ struct AboutDialogCreditItem {
{}
// No copy
AboutDialogCreditItem(const AboutDialogCreditItem&) = delete;
AboutDialogCreditItem& operator= (const AboutDialogCreditItem&) = delete;
AboutDialogCreditItem(const AboutDialogCreditItem&) PROHIBITED;
AboutDialogCreditItem& operator= (const AboutDialogCreditItem&) PROHIBITED;
// Move constructor, because wxString lacks one
AboutDialogCreditItem(AboutDialogCreditItem &&moveMe)

View File

@ -164,9 +164,12 @@ void QuitAudacity();
#include <memory>
#include <utility>
// Reviewed, certified, non-leaky uses of new that immediately entrust their results to RAII objects.
// You may use it in new code when constructing a wxWindow subclass with non-NULL parent window.
// You may use it in new code when the new expression is the constructor argument for a standard smart
// This renames a good use of this C++ keyword that we don't need to review when hunting for leaks.
#define PROHIBITED = delete
// Reviewed, certified, non-leaky uses of NEW that immediately entrust their results to RAII objects.
// You may use it in NEW code when constructing a wxWindow subclass with non-NULL parent window.
// You may use it in NEW code when the NEW expression is the constructor argument for a standard smart
// pointer like std::unique_ptr or std::shared_ptr.
#define safenew new
@ -181,8 +184,8 @@ void QuitAudacity();
auto q = std::make_unique<Myclass[]>(count);
q[0].DoSomethingElse();
The first hides naked new and delete from the source code.
The second hides new[] and delete[]. Both of course ensure destruction if
The first hides naked NEW and DELETE from the source code.
The second hides NEW[] and DELETE[]. Both of course ensure destruction if
you don't use something like std::move(p) or q.release(). Both expressions require
that you identify the type only once, which is brief and less error prone.

View File

@ -10,6 +10,7 @@
#include "Snap.h"
#include <algorithm>
#include <cstdlib>
#include "Project.h"

View File

@ -15,6 +15,7 @@
#ifndef __AUDACITY_SNAP__
#define __AUDACITY_SNAP__
#include <vector>
#include <wx/defs.h>
#include <wx/dynarray.h>
#include <wx/string.h>

View File

@ -76,6 +76,7 @@ CommandManager. It holds the callback for one command.
*//******************************************************************/
#include "../Audacity.h"
#include "CommandManager.h"
#include <wx/defs.h>
#include <wx/hash.h>
@ -88,8 +89,6 @@ CommandManager. It holds the callback for one command.
#include "../Prefs.h"
#include "../Project.h"
#include "CommandManager.h"
#include "Keyboard.h"
#include "../PluginManager.h"
#include "../effects/EffectManager.h"

View File

@ -14,6 +14,7 @@
#include "../Experimental.h"
#include <vector>
#include <wx/string.h>
#include <wx/dynarray.h>
#include <wx/menu.h>