From 525d59760cd72d3b0c31322c77db1e91b93d6197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 19 Sep 2023 22:11:36 +0200 Subject: [PATCH 1/2] Initialize uninitalized pointer in the constructor --- src/effects/backends/lv2/lv2effectprocessor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/effects/backends/lv2/lv2effectprocessor.cpp b/src/effects/backends/lv2/lv2effectprocessor.cpp index 82a3ff10c1d..7ae1ef61a9d 100644 --- a/src/effects/backends/lv2/lv2effectprocessor.cpp +++ b/src/effects/backends/lv2/lv2effectprocessor.cpp @@ -5,6 +5,7 @@ LV2EffectProcessor::LV2EffectProcessor(LV2EffectManifestPointer pManifest) : m_pManifest(pManifest), + m_LV2parameters(nullptr), m_pPlugin(pManifest->getPlugin()), m_audioPortIndices(pManifest->getAudioPortIndices()), m_controlPortIndices(pManifest->getControlPortIndices()) { From 606960106a109321002dd0d872838488e0c5b15e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 19 Sep 2023 22:27:02 +0200 Subject: [PATCH 2/2] Add missing namespace closing comments [google-readability-namespace-comments] --- src/control/controlcompressingproxy.cpp | 2 +- src/control/controlindicator.cpp | 2 +- src/controllers/controlpickermenu.cpp | 2 +- src/controllers/delegates/midioptionsdelegate.cpp | 2 +- src/controllers/midi/portmidicontroller.cpp | 2 +- src/effects/presets/effectpresetmanager.cpp | 2 +- src/engine/controls/loopingcontrol.cpp | 2 +- src/engine/enginemixer.cpp | 2 +- src/library/library.cpp | 2 +- src/library/trackset/setlogfeature.cpp | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/control/controlcompressingproxy.cpp b/src/control/controlcompressingproxy.cpp index ce8c1cc1b84..dbae37173aa 100644 --- a/src/control/controlcompressingproxy.cpp +++ b/src/control/controlcompressingproxy.cpp @@ -4,7 +4,7 @@ namespace { constexpr int kMaxNumOfRecursions = 128; -} +} // namespace // Event queue compressing proxy CompressingProxy::CompressingProxy(const ConfigKey& key, diff --git a/src/control/controlindicator.cpp b/src/control/controlindicator.cpp index 8c1dab6f001..34f1844cc3a 100644 --- a/src/control/controlindicator.cpp +++ b/src/control/controlindicator.cpp @@ -6,7 +6,7 @@ namespace { const QString kAppGroup = QStringLiteral("[App]"); -} +} // namespace ControlIndicator::ControlIndicator(const ConfigKey& key) : ControlObject(key, false), diff --git a/src/controllers/controlpickermenu.cpp b/src/controllers/controlpickermenu.cpp index 7a32588bcef..fbecb6c0801 100644 --- a/src/controllers/controlpickermenu.cpp +++ b/src/controllers/controlpickermenu.cpp @@ -13,7 +13,7 @@ namespace { const QString kAppGroup = QStringLiteral("[App]"); -} +} // namespace ControlPickerMenu::ControlPickerMenu(QWidget* pParent) : QMenu(pParent) { diff --git a/src/controllers/delegates/midioptionsdelegate.cpp b/src/controllers/delegates/midioptionsdelegate.cpp index 8e10fa017b4..dc870d519ca 100644 --- a/src/controllers/delegates/midioptionsdelegate.cpp +++ b/src/controllers/delegates/midioptionsdelegate.cpp @@ -28,7 +28,7 @@ const QList kMidiOptions = { MidiOption::FourteenBitLSB, }; -} +} // namespace MidiOptionsDelegate::MidiOptionsDelegate(QObject* pParent) : QStyledItemDelegate(pParent) { diff --git a/src/controllers/midi/portmidicontroller.cpp b/src/controllers/midi/portmidicontroller.cpp index fe9ff4867ee..0d0ef1f6a90 100644 --- a/src/controllers/midi/portmidicontroller.cpp +++ b/src/controllers/midi/portmidicontroller.cpp @@ -5,7 +5,7 @@ namespace { const QString kUnknownControllerName = QStringLiteral("Unknown PortMidiController"); -} +} // namespace PortMidiController::PortMidiController(const PmDeviceInfo* inputDeviceInfo, const PmDeviceInfo* outputDeviceInfo, diff --git a/src/effects/presets/effectpresetmanager.cpp b/src/effects/presets/effectpresetmanager.cpp index 06101ca4b4a..3633415660a 100644 --- a/src/effects/presets/effectpresetmanager.cpp +++ b/src/effects/presets/effectpresetmanager.cpp @@ -8,7 +8,7 @@ namespace { const QString kEffectDefaultsDirectory = "/effects/defaults"; -} +} // namespace EffectPresetManager::EffectPresetManager(UserSettingsPointer pConfig, EffectsBackendManagerPointer pBackendManager) diff --git a/src/engine/controls/loopingcontrol.cpp b/src/engine/controls/loopingcontrol.cpp index f33943361f8..0589d176815 100644 --- a/src/engine/controls/loopingcontrol.cpp +++ b/src/engine/controls/loopingcontrol.cpp @@ -21,7 +21,7 @@ constexpr mixxx::audio::FrameDiff_t kMinimumAudibleLoopSizeFrames = 150; bool positionNear(mixxx::audio::FramePos a, mixxx::audio::FramePos target) { return a.isValid() && a > target - 1 && a < target + 1; } -} +} // namespace double LoopingControl::s_dBeatSizes[] = { 0.03125, 0.0625, 0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }; diff --git a/src/engine/enginemixer.cpp b/src/engine/enginemixer.cpp index 12fcccd1687..7e131e90578 100644 --- a/src/engine/enginemixer.cpp +++ b/src/engine/enginemixer.cpp @@ -30,7 +30,7 @@ namespace { const QString kAppGroup = QStringLiteral("[App]"); -} +} // namespace EngineMixer::EngineMixer( UserSettingsPointer pConfig, diff --git a/src/library/library.cpp b/src/library/library.cpp index 7d6f50ad1a4..5ed953ec48a 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -50,7 +50,7 @@ namespace { const mixxx::Logger kLogger("Library"); -} // anonymous namespace +} // namespace using namespace mixxx::library::prefs; diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 83bc757cc70..5e345206926 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -22,7 +22,7 @@ namespace { constexpr int kNumToplevelHistoryEntries = 5; -} +} // namespace using namespace mixxx::library::prefs;