Remove unnecessary initializers for empty wxString
This commit is contained in:
parent
135c2a71ce
commit
06b3b42794
|
@ -450,7 +450,7 @@ void AboutDialog::PopulateInformationPage( ShuttleGui & S )
|
|||
// create a html pane in it to put the content in.
|
||||
wxString enabled = _("Enabled");
|
||||
wxString disabled = _("Disabled");
|
||||
wxString blank = wxT("");
|
||||
wxString blank;
|
||||
|
||||
/* this builds up the list of information to go in the window in the string
|
||||
* informationStr */
|
||||
|
|
|
@ -1753,7 +1753,7 @@ bool AudacityApp::InitTempDir()
|
|||
wxString tempFromPrefs = gPrefs->Read(wxT("/Directories/TempDir"), wxT(""));
|
||||
wxString tempDefaultLoc = wxGetApp().defaultTempDir;
|
||||
|
||||
wxString temp = wxT("");
|
||||
wxString temp;
|
||||
|
||||
#ifdef __WXGTK__
|
||||
if (tempFromPrefs.length() > 0 && tempFromPrefs[0] != wxT('/'))
|
||||
|
|
|
@ -90,7 +90,6 @@ static const std::pair<const wxChar*, const wxChar*> SpecialCommands[] = {
|
|||
|
||||
MacroCommands::MacroCommands()
|
||||
{
|
||||
mMessage = "";
|
||||
ResetMacro();
|
||||
|
||||
auto names = GetNames();
|
||||
|
|
|
@ -533,7 +533,7 @@ void DependencyDialog::OnRightClick( wxListEvent& event)
|
|||
void DependencyDialog::OnCopyToClipboard( wxCommandEvent& evt )
|
||||
{
|
||||
static_cast<void>(evt);
|
||||
wxString Files = "";
|
||||
wxString Files;
|
||||
for (const auto &aliasedFile : mAliasedFiles) {
|
||||
const wxFileName & fileName = aliasedFile.mFileName;
|
||||
wxLongLong byteCount = (aliasedFile.mByteCount * 124) / 100;
|
||||
|
|
|
@ -2799,7 +2799,7 @@ bool PluginManager::GetSubgroups(const wxString & group, wxArrayString & subgrou
|
|||
wxString path = GetSettings()->GetPath();
|
||||
GetSettings()->SetPath(group);
|
||||
|
||||
wxString name = wxEmptyString;
|
||||
wxString name;
|
||||
long index = 0;
|
||||
if (GetSettings()->GetFirstGroup(name, index))
|
||||
{
|
||||
|
@ -2832,7 +2832,7 @@ bool PluginManager::GetConfig(const wxString & key, wxString & value, const wxSt
|
|||
|
||||
if (!key.empty())
|
||||
{
|
||||
wxString wxval = wxEmptyString;
|
||||
wxString wxval;
|
||||
|
||||
result = GetSettings()->Read(key, &wxval, defval);
|
||||
|
||||
|
|
|
@ -2467,7 +2467,6 @@ public:
|
|||
p->Raise(); // May help identifying the window on Mac
|
||||
|
||||
// Construct this projects name and number.
|
||||
sProjNumber = "";
|
||||
sProjName = p->GetName();
|
||||
if (sProjName.empty()){
|
||||
sProjName = _("<untitled>");
|
||||
|
@ -3873,7 +3872,7 @@ bool AudacityProject::DoSave (const bool fromSaveAs,
|
|||
// Always save a backup of the original project file
|
||||
//
|
||||
|
||||
wxString safetyFileName = wxT("");
|
||||
wxString safetyFileName;
|
||||
if (wxFileExists(mFileName)) {
|
||||
|
||||
#ifdef __WXGTK__
|
||||
|
@ -4308,7 +4307,7 @@ void AudacityProject::ZoomAfterImport(Track *pTrack)
|
|||
bool AudacityProject::Import(const wxString &fileName, WaveTrackArray* pTrackArray /*= NULL*/)
|
||||
{
|
||||
TrackHolders newTracks;
|
||||
wxString errorMessage = wxEmptyString;
|
||||
wxString errorMessage;
|
||||
|
||||
{
|
||||
// Backup Tags, before the import. Be prepared to roll back changes.
|
||||
|
@ -4479,7 +4478,7 @@ For an audio file that will open in other apps, use 'Export'.\n");
|
|||
}
|
||||
|
||||
bool bPrompt = (mBatchMode == 0) || (mFileName.empty());
|
||||
wxString fName = "";
|
||||
wxString fName;
|
||||
|
||||
if (bPrompt) {
|
||||
// JKC: I removed 'wxFD_OVERWRITE_PROMPT' because we are checking
|
||||
|
@ -5436,7 +5435,7 @@ bool AudacityProject::SaveFromTimerRecording(wxFileName fnFile) {
|
|||
|
||||
// MY: To allow SaveAs from Timer Recording we need to check what
|
||||
// the value of mFileName is before we change it.
|
||||
wxString sOldFilename = "";
|
||||
wxString sOldFilename;
|
||||
if (IsProjectSaved()) {
|
||||
sOldFilename = mFileName;
|
||||
}
|
||||
|
@ -5477,7 +5476,7 @@ bool AudacityProject::ProjectHasTracks() {
|
|||
wxString AudacityProject::GetHoursMinsString(int iMinutes)
|
||||
{
|
||||
|
||||
wxString sFormatted = wxEmptyString;
|
||||
wxString sFormatted;
|
||||
|
||||
if (iMinutes < 1) {
|
||||
// Less than a minute...
|
||||
|
|
|
@ -47,7 +47,7 @@ class ShuttleCli final : public Shuttle
|
|||
{
|
||||
public:
|
||||
wxString mParams;
|
||||
ShuttleCli(){ mParams = wxT("") ;}
|
||||
ShuttleCli() {}
|
||||
virtual ~ShuttleCli() {}
|
||||
bool ExchangeWithMaster(const wxString & Name) override;
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
wxString mParams;
|
||||
bool *pOptionalFlag;
|
||||
CommandParameters * mpEap;
|
||||
ShuttleParams(){ mParams = wxT("") ;mpEap=NULL;pOptionalFlag=NULL;}
|
||||
ShuttleParams() { mpEap = NULL; pOptionalFlag = NULL; }
|
||||
virtual ~ShuttleParams() {}
|
||||
bool ExchangeWithMaster(const wxString & Name) override;
|
||||
bool ShouldSet();
|
||||
|
|
|
@ -416,13 +416,13 @@ void TimerRecordDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
|||
if (iMinsRecording >= iMinsLeft) {
|
||||
|
||||
// Format the strings
|
||||
wxString sRemainingTime = "";
|
||||
wxString sRemainingTime;
|
||||
sRemainingTime = pProject->GetHoursMinsString(iMinsLeft);
|
||||
wxString sPlannedTime = "";
|
||||
wxString sPlannedTime;
|
||||
sPlannedTime = pProject->GetHoursMinsString(iMinsRecording);
|
||||
|
||||
// Create the message string
|
||||
wxString sMessage = "";
|
||||
wxString sMessage;
|
||||
sMessage.Printf(_("You may not have enough free disk space to complete this Timer Recording, based on your current settings.\n\nDo you wish to continue?\n\nPlanned recording duration: %s\nRecording time remaining on disk: %s"),
|
||||
sPlannedTime,
|
||||
sRemainingTime);
|
||||
|
@ -890,7 +890,7 @@ void TimerRecordDialog::PopulateOrExchange(ShuttleGui& S)
|
|||
(bAutoSave ? "true" : "false"));
|
||||
S.StartMultiColumn(3, wxEXPAND);
|
||||
{
|
||||
wxString sInitialValue = wxT("");
|
||||
wxString sInitialValue;
|
||||
AudacityProject* pProject = GetActiveProject();
|
||||
wxString sSaveValue = pProject->GetFileName();
|
||||
if (!sSaveValue.empty()) {
|
||||
|
|
|
@ -1080,7 +1080,7 @@ wxString CommandManager::GetLabelWithDisabledAccel(const CommandListEntry *entry
|
|||
{
|
||||
wxString label = entry->label;
|
||||
#if 1
|
||||
wxString Accel = "";
|
||||
wxString Accel;
|
||||
do{
|
||||
if (!entry->key.empty())
|
||||
{
|
||||
|
@ -1253,7 +1253,7 @@ void CommandManager::TellUserWhyDisallowed( const wxString & Name, CommandFlag f
|
|||
wxString reason = _("There was a problem with your last action. If you think\nthis is a bug, please tell us exactly where it occurred.");
|
||||
// The default title string is 'Disallowed'.
|
||||
wxString title = _("Disallowed");
|
||||
wxString helpPage ="";
|
||||
wxString helpPage;
|
||||
|
||||
auto missingFlags = flagsRequired & (~flagsGot );
|
||||
if( missingFlags & AudioIONotBusyFlag )
|
||||
|
|
|
@ -136,7 +136,7 @@ void LispyCommandMessageTarget::EndStruct(){
|
|||
Update( ")" );
|
||||
}
|
||||
void LispyCommandMessageTarget::AddItem(const wxString &value, const wxString &name){
|
||||
wxString Padding = "";
|
||||
wxString Padding;
|
||||
if( name.empty() )
|
||||
Update( wxString::Format( "%s%s\"%s\"", (mCounts.back()>0)?" ":"", Padding, Escaped(value)));
|
||||
else
|
||||
|
|
|
@ -77,7 +77,7 @@ wxString NormalizedKeyString::Display(bool usesSpecialChars) const
|
|||
|
||||
NormalizedKeyString KeyEventToKeyString(const wxKeyEvent & event)
|
||||
{
|
||||
wxString newStr = wxT("");
|
||||
wxString newStr;
|
||||
|
||||
long key = event.GetKeyCode();
|
||||
|
||||
|
|
|
@ -1345,7 +1345,7 @@ void EffectEqualization::LoadCurves(const wxString &fileName, bool append)
|
|||
if(fileName.empty()) {
|
||||
// Check if presets are up to date.
|
||||
wxString eqCurvesCurrentVersion = wxString::Format(wxT("%d.%d"), EQCURVES_VERSION, EQCURVES_REVISION);
|
||||
wxString eqCurvesInstalledVersion = wxT("");
|
||||
wxString eqCurvesInstalledVersion;
|
||||
gPrefs->Read(wxT("/Effects/Equalization/PresetVersion"), &eqCurvesInstalledVersion, wxT(""));
|
||||
|
||||
bool needUpdate = (eqCurvesCurrentVersion != eqCurvesInstalledVersion);
|
||||
|
@ -3490,7 +3490,7 @@ void EditCurvesDialog::OnDelete(wxCommandEvent & WXUNUSED(event))
|
|||
void EditCurvesDialog::OnImport( wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
FileDialogWrapper filePicker(this, _("Choose an EQ curve file"), FileNames::DataDir(), wxT(""), _("xml files (*.xml;*.XML)|*.xml;*.XML"));
|
||||
wxString fileName = wxT("");
|
||||
wxString fileName;
|
||||
if( filePicker.ShowModal() == wxID_CANCEL)
|
||||
return;
|
||||
else
|
||||
|
@ -3510,7 +3510,7 @@ void EditCurvesDialog::OnImport( wxCommandEvent & WXUNUSED(event))
|
|||
void EditCurvesDialog::OnExport( wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
FileDialogWrapper filePicker(this, _("Export EQ curves as..."), FileNames::DataDir(), wxT(""), wxT("*.XML"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER); // wxFD_CHANGE_DIR?
|
||||
wxString fileName = wxT("");
|
||||
wxString fileName;
|
||||
if( filePicker.ShowModal() == wxID_CANCEL)
|
||||
return;
|
||||
else
|
||||
|
|
|
@ -129,8 +129,6 @@ NyquistEffect::NyquistEffect(const wxString &fName)
|
|||
mOutputTrack[0] = mOutputTrack[1] = nullptr;
|
||||
|
||||
mAction = XO("Applying Nyquist Effect...");
|
||||
mInputCmd = wxEmptyString;
|
||||
mCmd = wxEmptyString;
|
||||
mIsPrompt = false;
|
||||
mExternal = false;
|
||||
mCompiler = false;
|
||||
|
@ -706,7 +704,7 @@ bool NyquistEffect::Process()
|
|||
int numLabel = 0;
|
||||
int numMidi = 0;
|
||||
int numTime = 0;
|
||||
wxString waveTrackList = wxT(""); // track positions of selected audio tracks.
|
||||
wxString waveTrackList; // track positions of selected audio tracks.
|
||||
|
||||
{
|
||||
auto countRange = project->GetTracks()->Leaders();
|
||||
|
@ -2637,7 +2635,7 @@ void NyquistEffect::BuildEffectWindow(ShuttleGui & S)
|
|||
S.AddSpace(10, 10);
|
||||
|
||||
// Get default file extension if specified in wildcards
|
||||
wxString defaultExtension = "";
|
||||
wxString defaultExtension;
|
||||
size_t len = ctrl.lowStr.length();
|
||||
int characters = ctrl.lowStr.Find("*");
|
||||
|
||||
|
@ -2949,7 +2947,7 @@ void NyquistEffect::OnFileButton(wxCommandEvent& evt)
|
|||
return;
|
||||
}
|
||||
|
||||
wxString path = "";
|
||||
wxString path;
|
||||
// When multiple files selected, return file paths as a list of quoted strings.
|
||||
if (flags & wxFD_MULTIPLE)
|
||||
{
|
||||
|
|
|
@ -282,7 +282,6 @@ Exporter::Exporter()
|
|||
{
|
||||
mMixerSpec = NULL;
|
||||
mBook = NULL;
|
||||
mFormatName = "";
|
||||
|
||||
SetFileDialogTitle( _("Export Audio") );
|
||||
|
||||
|
|
|
@ -2002,7 +2002,7 @@ int ExportMP3::AskResample(int bitrate, int rate, int lowrate, int highrate)
|
|||
S.EndHorizontalLay();
|
||||
|
||||
wxArrayString choices;
|
||||
wxString selected = wxT("");
|
||||
wxString selected;
|
||||
for (size_t i = 0; i < WXSIZEOF(sampRates); i++) {
|
||||
int label = sampRates[i].label;
|
||||
if (label >= lowrate && label <= highrate) {
|
||||
|
|
|
@ -152,7 +152,7 @@ void Importer::ReadImportItems()
|
|||
*/
|
||||
for (item_counter = 0; true; item_counter++)
|
||||
{
|
||||
wxString condition, filters, used_filters, unused_filters = wxEmptyString, extensions, mime_types = wxEmptyString;
|
||||
wxString condition, filters, used_filters, unused_filters, extensions, mime_types;
|
||||
item_name.Printf (wxT("/ExtImportItems/Item%d"), item_counter);
|
||||
/* Break at first non-existent item */
|
||||
if (!gPrefs->Read(item_name, &item_value))
|
||||
|
|
|
@ -439,7 +439,7 @@ bool FFmpegImportFileHandle::InitCodecs()
|
|||
duration = sc->m_stream->duration * sc->m_stream->time_base.num / sc->m_stream->time_base.den;
|
||||
else
|
||||
duration = mFormatContext->duration / AV_TIME_BASE;
|
||||
wxString bitrate = wxT("");
|
||||
wxString bitrate;
|
||||
if (sc->m_codecCtx->bit_rate > 0)
|
||||
bitrate.Printf(wxT("%d"),(int)sc->m_codecCtx->bit_rate);
|
||||
else
|
||||
|
|
|
@ -511,7 +511,7 @@ void QTImportFileHandle::AddMetadata(Tags *tags)
|
|||
if (err != noErr)
|
||||
continue;
|
||||
|
||||
wxString v = wxT("");
|
||||
wxString v;
|
||||
|
||||
switch (dataType)
|
||||
{
|
||||
|
|
|
@ -332,7 +332,7 @@ void OnExportMIDI(const CommandContext &context)
|
|||
|
||||
while(true) {
|
||||
|
||||
wxString fName = wxT("");
|
||||
wxString fName;
|
||||
|
||||
fName = FileNames::SelectFile(FileNames::Operation::Export,
|
||||
_("Export MIDI As:"),
|
||||
|
|
|
@ -265,7 +265,7 @@ void AddEffectMenuItems(
|
|||
name += wxT("...");
|
||||
}
|
||||
|
||||
wxString group = wxEmptyString;
|
||||
wxString group;
|
||||
if (groupBy == wxT("sortby:publisher:name"))
|
||||
{
|
||||
group = EffectManager::Get().GetVendorName(plug->GetID());
|
||||
|
|
|
@ -1121,7 +1121,6 @@ const wxString &Scrubber::GetUntranslatedStateString() const
|
|||
wxString Scrubber::StatusMessageForWave() const
|
||||
{
|
||||
wxString result;
|
||||
result = "";
|
||||
|
||||
if( Seeks() )
|
||||
result = _("Move mouse pointer to Seek");
|
||||
|
|
|
@ -607,11 +607,6 @@ NumericConverter::NumericConverter(Type type,
|
|||
if (type == NumericConverter::TIME )
|
||||
mDefaultNdx = 4; // Default to "hh:mm:ss + milliseconds".
|
||||
|
||||
mPrefix = wxT("");
|
||||
mValueTemplate = wxT("");
|
||||
mValueMask = wxT("");
|
||||
mValueString = wxT("");
|
||||
|
||||
mScalingFactor = 1.0f;
|
||||
mSampleRate = 1.0f;
|
||||
mNtscDrop = false;
|
||||
|
|
|
@ -85,7 +85,6 @@ Ruler::Ruler()
|
|||
mFlip = false;
|
||||
mLog = false;
|
||||
mLabelEdges = false;
|
||||
mUnits = wxT("");
|
||||
|
||||
mLeft = -1;
|
||||
mTop = -1;
|
||||
|
|
|
@ -29,7 +29,6 @@ XMLFileReader::XMLFileReader()
|
|||
XML_SetElementHandler(mParser, startElement, endElement);
|
||||
XML_SetCharacterDataHandler(mParser, charHandler);
|
||||
mBaseHandler = NULL;
|
||||
mErrorStr = wxT("");
|
||||
mHandler.reserve(128);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue