mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-03 09:29:30 +02:00
Merge branch 'master' into antifrag2
This commit is contained in:
commit
ca53b191b1
@ -28,8 +28,8 @@ struct AboutDialogCreditItem {
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
// No copy
|
// No copy
|
||||||
AboutDialogCreditItem(const AboutDialogCreditItem&) = delete;
|
AboutDialogCreditItem(const AboutDialogCreditItem&) PROHIBITED;
|
||||||
AboutDialogCreditItem& operator= (const AboutDialogCreditItem&) = delete;
|
AboutDialogCreditItem& operator= (const AboutDialogCreditItem&) PROHIBITED;
|
||||||
|
|
||||||
// Move constructor, because wxString lacks one
|
// Move constructor, because wxString lacks one
|
||||||
AboutDialogCreditItem(AboutDialogCreditItem &&moveMe)
|
AboutDialogCreditItem(AboutDialogCreditItem &&moveMe)
|
||||||
|
@ -164,9 +164,12 @@ void QuitAudacity();
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
// Reviewed, certified, non-leaky uses of new that immediately entrust their results to RAII objects.
|
// This renames a good use of this C++ keyword that we don't need to review when hunting for leaks.
|
||||||
// You may use it in new code when constructing a wxWindow subclass with non-NULL parent window.
|
#define PROHIBITED = delete
|
||||||
// You may use it in new code when the new expression is the constructor argument for a standard smart
|
|
||||||
|
// 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.
|
// pointer like std::unique_ptr or std::shared_ptr.
|
||||||
#define safenew new
|
#define safenew new
|
||||||
|
|
||||||
@ -181,8 +184,8 @@ void QuitAudacity();
|
|||||||
auto q = std::make_unique<Myclass[]>(count);
|
auto q = std::make_unique<Myclass[]>(count);
|
||||||
q[0].DoSomethingElse();
|
q[0].DoSomethingElse();
|
||||||
|
|
||||||
The first hides naked new and delete from the source code.
|
The first hides naked NEW and DELETE from the source code.
|
||||||
The second hides new[] and delete[]. Both of course ensure destruction if
|
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
|
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.
|
that you identify the type only once, which is brief and less error prone.
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "Snap.h"
|
#include "Snap.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include "Project.h"
|
#include "Project.h"
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#ifndef __AUDACITY_SNAP__
|
#ifndef __AUDACITY_SNAP__
|
||||||
#define __AUDACITY_SNAP__
|
#define __AUDACITY_SNAP__
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include <wx/defs.h>
|
#include <wx/defs.h>
|
||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
|
@ -76,6 +76,7 @@ CommandManager. It holds the callback for one command.
|
|||||||
*//******************************************************************/
|
*//******************************************************************/
|
||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
|
#include "CommandManager.h"
|
||||||
|
|
||||||
#include <wx/defs.h>
|
#include <wx/defs.h>
|
||||||
#include <wx/hash.h>
|
#include <wx/hash.h>
|
||||||
@ -88,8 +89,6 @@ CommandManager. It holds the callback for one command.
|
|||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
|
|
||||||
#include "CommandManager.h"
|
|
||||||
|
|
||||||
#include "Keyboard.h"
|
#include "Keyboard.h"
|
||||||
#include "../PluginManager.h"
|
#include "../PluginManager.h"
|
||||||
#include "../effects/EffectManager.h"
|
#include "../effects/EffectManager.h"
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
#include <wx/menu.h>
|
#include <wx/menu.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user