diff --git a/src/PluginManager.cpp b/src/PluginManager.cpp index dabff281a..dd38b98d1 100644 --- a/src/PluginManager.cpp +++ b/src/PluginManager.cpp @@ -825,6 +825,8 @@ int wxCALLBACK PluginRegistrationDialog::SortCompare(long item1, long item2, lon int PluginRegistrationDialog::SortCompare(ItemData *item1, ItemData *item2) { + // This function is a three-valued comparator + wxString *str1; wxString *str2; diff --git a/src/commands/CommandManager.cpp b/src/commands/CommandManager.cpp index f4b4ed8e1..11665b476 100644 --- a/src/commands/CommandManager.cpp +++ b/src/commands/CommandManager.cpp @@ -577,7 +577,7 @@ wxMenuBar * CommandManager::GetMenuBar(const wxString & sMenu) const { for (const auto &entry : mMenuBarList) { - if(!entry.name.Cmp(sMenu)) + if(entry.name == sMenu) return entry.menubar; } diff --git a/src/export/ExportFFmpegDialogs.cpp b/src/export/ExportFFmpegDialogs.cpp index aea0dec2f..6dbc3ac5b 100644 --- a/src/export/ExportFFmpegDialogs.cpp +++ b/src/export/ExportFFmpegDialogs.cpp @@ -1669,7 +1669,7 @@ int ExportFFmpegOptions::FetchCompatibleCodecList(const wxChar *fmt, AVCodecID i wxString str(fmt); for (int i = 0; CompatibilityList[i].fmt != NULL; i++) { - if (str.Cmp(CompatibilityList[i].fmt) == 0) + if (str == CompatibilityList[i].fmt) { // Format is found in the list found = 1; @@ -1748,7 +1748,7 @@ int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfm { if (CompatibilityList[i].codec == id || CompatibilityList[i].codec == AV_CODEC_ID_NONE) { - if ((selfmt != NULL) && (selfmt->Cmp(CompatibilityList[i].fmt) == 0)) index = mShownFormatNames.size(); + if ((selfmt != NULL) && (*selfmt == CompatibilityList[i].fmt)) index = mShownFormatNames.size(); FromList.push_back(CompatibilityList[i].fmt); mShownFormatNames.push_back(CompatibilityList[i].fmt); AVOutputFormat *tofmt = av_guess_format(wxString(CompatibilityList[i].fmt).ToUTF8(),NULL,NULL); @@ -1760,7 +1760,7 @@ int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfm { for (int i = 0; CompatibilityList[i].fmt != NULL; i++) { - if (!selfmt->Cmp(CompatibilityList[i].fmt)) + if (*selfmt == CompatibilityList[i].fmt) { found = true; break; @@ -1779,7 +1779,7 @@ int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfm found = false; for (unsigned int i = 0; i < FromList.size(); i++) { - if (ofmtname.Cmp(FromList[i]) == 0) + if (ofmtname == FromList[i]) { found = true; break; @@ -1787,7 +1787,9 @@ int ExportFFmpegOptions::FetchCompatibleFormatList(AVCodecID id, wxString *selfm } if (!found) { - if ((selfmt != NULL) && (selfmt->Cmp(wxString::FromUTF8(ofmt->name)) == 0)) index = mShownFormatNames.size(); + if ((selfmt != NULL) && + (*selfmt == wxString::FromUTF8(ofmt->name))) + index = mShownFormatNames.size(); mShownFormatNames.push_back(wxString::FromUTF8(ofmt->name)); mShownFormatLongNames.push_back(wxString::Format(wxT("%s - %s"),mShownFormatNames.back(),wxString::FromUTF8(ofmt->long_name))); } @@ -1934,8 +1936,9 @@ void ExportFFmpegOptions::EnableDisableControls(AVCodec *cdc, wxString *selfmt) bool format = false; if (apptable[i].codec == AV_CODEC_ID_NONE) codec = true; else if (cdc != NULL && apptable[i].codec == cdc->id) codec = true; - if (!wxString::FromUTF8(apptable[i].format).Cmp(wxT("any"))) format = true; - else if (selfmt != NULL && selfmt->Cmp(wxString::FromUTF8(apptable[i].format)) == 0) format = true; + if (wxString::FromUTF8(apptable[i].format) == wxT("any")) format = true; + else if (selfmt != NULL && + *selfmt == wxString::FromUTF8(apptable[i].format)) format = true; if (codec && format) { handled = apptable[i].control; diff --git a/src/import/Import.cpp b/src/import/Import.cpp index 631a7bce8..42e3ec73f 100644 --- a/src/import/Import.cpp +++ b/src/import/Import.cpp @@ -207,7 +207,7 @@ void Importer::ReadImportItems() bool found = false; for (const auto &importPlugin : mImportPluginList) { - if (importPlugin->GetPluginStringID().Cmp(new_item->filters[i]) == 0) + if (importPlugin->GetPluginStringID() == new_item->filters[i]) { new_item->filter_objects.push_back(importPlugin.get()); found = true; diff --git a/src/prefs/ExtImportPrefs.cpp b/src/prefs/ExtImportPrefs.cpp index aa47d510a..e1cf860e7 100644 --- a/src/prefs/ExtImportPrefs.cpp +++ b/src/prefs/ExtImportPrefs.cpp @@ -505,7 +505,7 @@ void ExtImportPrefs::OnRuleTableEdit (wxGridEvent& event) wxString trimmed = vals[i]; trimmed.Trim().Trim(false); - if (trimmed.Cmp(vals[i]) != 0) + if (trimmed != vals[i]) { if (!askedAboutSpaces) {