mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 08:59:28 +02:00
Make a large number of global variables static so they only have file scope when that is all they need. Part of a patch by Campbell Barton
This commit is contained in:
parent
eee032648e
commit
61de872bf2
@ -32,8 +32,8 @@
|
|||||||
#include "Printing.h"
|
#include "Printing.h"
|
||||||
|
|
||||||
// Globals, so that we remember settings from session to session
|
// Globals, so that we remember settings from session to session
|
||||||
wxPrintData *gPrintData = NULL;
|
static wxPrintData *gPrintData = NULL;
|
||||||
wxPageSetupData *gPageSetupData = NULL;
|
static wxPageSetupData *gPageSetupData = NULL;
|
||||||
|
|
||||||
class AudacityPrintout : public wxPrintout
|
class AudacityPrintout : public wxPrintout
|
||||||
{
|
{
|
||||||
|
@ -2282,7 +2282,7 @@ void AudacityProject::OpenFiles(AudacityProject *proj)
|
|||||||
|
|
||||||
// Most of this string was duplicated 3 places. Made the warning consistent in this global.
|
// Most of this string was duplicated 3 places. Made the warning consistent in this global.
|
||||||
// The %s is to be filled with the version string.
|
// The %s is to be filled with the version string.
|
||||||
wxString gsLegacyFileWarning =
|
static wxString gsLegacyFileWarning =
|
||||||
_("This file was saved by Audacity version %s. The format has changed. \
|
_("This file was saved by Audacity version %s. The format has changed. \
|
||||||
\n\nAudacity can try to open and save this file, but saving it in this \
|
\n\nAudacity can try to open and save this file, but saving it in this \
|
||||||
\nversion will then prevent any 1.2 or earlier version opening it. \
|
\nversion will then prevent any 1.2 or earlier version opening it. \
|
||||||
|
@ -44,9 +44,9 @@
|
|||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "Dither.h"
|
#include "Dither.h"
|
||||||
|
|
||||||
Dither::DitherType gLowQualityDither = Dither::none;
|
static Dither::DitherType gLowQualityDither = Dither::none;
|
||||||
Dither::DitherType gHighQualityDither = Dither::none;
|
static Dither::DitherType gHighQualityDither = Dither::none;
|
||||||
Dither gDitherAlgorithm;
|
static Dither gDitherAlgorithm;
|
||||||
|
|
||||||
void InitDitherers()
|
void InitDitherers()
|
||||||
{
|
{
|
||||||
|
@ -186,7 +186,7 @@ WX_DEFINE_USER_EXPORTED_OBJARRAY( ArrayOfColours )
|
|||||||
#include "AllThemeResources.h"
|
#include "AllThemeResources.h"
|
||||||
|
|
||||||
// Include the ImageCache...
|
// Include the ImageCache...
|
||||||
unsigned char ImageCacheAsData[] = {
|
static unsigned char ImageCacheAsData[] = {
|
||||||
#include "ThemeAsCeeCode.h"
|
#include "ThemeAsCeeCode.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7314,11 +7314,11 @@ wxString TrackPanel::TrackSubText(Track * t)
|
|||||||
|
|
||||||
/// Handle the menu options that change a track between
|
/// Handle the menu options that change a track between
|
||||||
/// left channel, right channel, and mono.
|
/// left channel, right channel, and mono.
|
||||||
int channels[] = { Track::LeftChannel, Track::RightChannel,
|
static int channels[] = { Track::LeftChannel, Track::RightChannel,
|
||||||
Track::MonoChannel
|
Track::MonoChannel
|
||||||
};
|
};
|
||||||
|
|
||||||
const wxChar *channelmsgs[] = { _("Left Channel"), _("Right Channel"),
|
static const wxChar *channelmsgs[] = { _("Left Channel"), _("Right Channel"),
|
||||||
_("Mono")
|
_("Mono")
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -7592,7 +7592,7 @@ const int nRates=12;
|
|||||||
|
|
||||||
/// gRates MUST CORRESPOND DIRECTLY TO THE RATES AS LISTED IN THE MENU!!
|
/// gRates MUST CORRESPOND DIRECTLY TO THE RATES AS LISTED IN THE MENU!!
|
||||||
/// IN THE SAME ORDER!!
|
/// IN THE SAME ORDER!!
|
||||||
int gRates[nRates] = { 8000, 11025, 16000, 22050, 44100, 48000, 88200, 96000,
|
static int gRates[nRates] = { 8000, 11025, 16000, 22050, 44100, 48000, 88200, 96000,
|
||||||
176400, 192000, 352800, 384000 };
|
176400, 192000, 352800, 384000 };
|
||||||
|
|
||||||
/// This method handles the selection from the Rate
|
/// This method handles the selection from the Rate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user