summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxerus2000 <27jf@pm.me>2020-07-30 12:01:45 +0200
committerxerus2000 <27jf@pm.me>2020-07-30 13:22:58 +0200
commit16950549cff6aad58fab58c1317e6a3eb40e9b87 (patch)
treec52db12393af749c0a0b571773df4b316064aa9d
parent8b92cb27ea32a6e80060d337dfcf6115a78c749a (diff)
Clean up headers & documentation
-rw-r--r--src/engine/channelhandle.h34
-rw-r--r--src/engine/channels/enginedeck.cpp17
-rw-r--r--src/engine/channels/enginedeck.h22
-rw-r--r--src/library/autodj/autodjfeature.h10
-rw-r--r--src/mixer/deck.h5
-rw-r--r--src/mixer/sampler.h5
-rw-r--r--src/test/signalpathtest.h9
7 files changed, 23 insertions, 79 deletions
diff --git a/src/engine/channelhandle.h b/src/engine/channelhandle.h
index 7ca061e801..baf350b7de 100644
--- a/src/engine/channelhandle.h
+++ b/src/engine/channelhandle.h
@@ -1,5 +1,13 @@
-#ifndef CHANNELHANDLE_H
-#define CHANNELHANDLE_H
+#pragma once
+
+#include <QHash>
+#include <QString>
+#include <QVarLengthArray>
+#include <QtDebug>
+#include <memory>
+
+#include "util/assert.h"
+
// ChannelHandle defines a unique identifier for channels of audio in the engine
// (e.g. headphone output, master output, deck 1, microphone 3). Previously we
// used the group string of the channel in the engine to uniquely identify it
@@ -12,21 +20,13 @@
// and equality of ChannelHandles are simple to calculate and a QVarLengthArray
// can be used to create a fast associative container backed by a simple array
// (since the keys are numbered [0, num_channels]).
-//
-// A helper class, ChannelHandleFactory, keeps a running count of handles that
-// have been assigned.
-#include <QHash>
-#include <QString>
-#include <QVarLengthArray>
-#include <QtDebug>
-#include <memory>
-
-#include "util/assert.h"
-
-// A wrapper around an integer handle. Used to uniquely identify and refer to
-// channels (headphone output, master output, deck 1, microphone 4, etc.) of
-// audio in the engine.
+/// A wrapper around an integer handle. Used to uniquely identify and refer to
+/// channels (headphone output, master output, deck 1, microphone 4, etc.) while
+/// avoiding slow QString comparisons incurred when using the group.
+///
+/// A helper class, ChannelHandleFactory, keeps a running count of handles that
+/// have been assigned.
class ChannelHandle {
public:
ChannelHandle() : m_iHandle(-1) {
@@ -219,5 +219,3 @@ class ChannelHandleMap {
container_type m_data;
T m_dummy;
};
-
-#endif /* CHANNELHANDLE,_H */
diff --git a/src/engine/channels/enginedeck.cpp b/src/engine/channels/enginedeck.cpp
index e0047eab61..73a1981936 100644
--- a/src/engine/channels/enginedeck.cpp
+++ b/src/engine/channels/enginedeck.cpp
@@ -1,20 +1,3 @@
-/***************************************************************************
- enginedeck.cpp - description
- -------------------
- begin : Sun Apr 28 2002
- copyright : (C) 2002 by
- email :
-***************************************************************************/
-
-/***************************************************************************
-* *
-* This program is free software; you can redistribute it and/or modify *
-* it under the terms of the GNU General Public License as published by *
-* the Free Software Foundation; either version 2 of the License, or *
-* (at your option) any later version. *
-* *
-***************************************************************************/
-
#include "engine/channels/enginedeck.h"
#include "control/controlpushbutton.h"
diff --git a/src/engine/channels/enginedeck.h b/src/engine/channels/enginedeck.h
index f571dadb38..a77447541d 100644
--- a/src/engine/channels/enginedeck.h
+++ b/src/engine/channels/enginedeck.h
@@ -1,22 +1,4 @@
-/***************************************************************************
- enginedeck.h - description
- -------------------
- begin : Sun Apr 28 2002
- copyright : (C) 2002 by
- email :
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef ENGINEDECK_H
-#define ENGINEDECK_H
+#pragma once
#include <QScopedPointer>
@@ -95,5 +77,3 @@ class EngineDeck : public EngineChannel, public AudioDestination {
bool m_bPassthroughWasActive;
bool m_wasActive;
};
-
-#endif
diff --git a/src/library/autodj/autodjfeature.h b/src/library/autodj/autodjfeature.h
index 5b23464d0d..18a3203a60 100644
--- a/src/library/autodj/autodjfeature.h
+++ b/src/library/autodj/autodjfeature.h
@@ -1,9 +1,4 @@
-// AutoDJfeature.h
-// FORK FORK FORK on 11/1/2009 by Albert Santoni (alberts@mixxx.org)
-// Created 8/23/2009 by RJ Ryan (rryan@mit.edu)
-
-#ifndef AUTODJFEATURE_H
-#define AUTODJFEATURE_H
+#pragma once
#include <QAction>
#include <QIcon>
@@ -107,6 +102,3 @@ class AutoDJFeature : public LibraryFeature {
// of tracks in the playlist
void slotRandomQueue(int numTracksToAdd);
};
-
-
-#endif /* AUTODJFEATURE_H */
diff --git a/src/mixer/deck.h b/src/mixer/deck.h
index 3d3a1697ff..62e4cf964b 100644
--- a/src/mixer/deck.h
+++ b/src/mixer/deck.h
@@ -1,5 +1,4 @@
-#ifndef MIXER_DECK_H
-#define MIXER_DECK_H
+#pragma once
#include <QObject>
@@ -17,5 +16,3 @@ class Deck : public BaseTrackPlayerImpl {
const QString& group);
~Deck() override = default;
};
-
-#endif // MIXER_DECK_H
diff --git a/src/mixer/sampler.h b/src/mixer/sampler.h
index 718ef8b93f..b8e2114de8 100644
--- a/src/mixer/sampler.h
+++ b/src/mixer/sampler.h
@@ -1,5 +1,4 @@
-#ifndef MIXER_SAMPLER_H
-#define MIXER_SAMPLER_H
+#pragma once
#include "mixer/basetrackplayer.h"
@@ -15,5 +14,3 @@ class Sampler : public BaseTrackPlayerImpl {
QString group);
~Sampler() override = default;
};
-
-#endif /* MIXER_SAMPLER_H */
diff --git a/src/test/signalpathtest.h b/src/test/signalpathtest.h
index d6bd67d070..21e297ea7a 100644
--- a/src/test/signalpathtest.h
+++ b/src/test/signalpathtest.h
@@ -1,5 +1,4 @@
-#ifndef ENGINEBACKENDTEST_H_
-#define ENGINEBACKENDTEST_H_
+#pragma once
#include <gtest/gtest.h>
#include <gmock/gmock.h>
@@ -210,11 +209,11 @@ class BaseSignalPathTest : public MixxxTest {
EngineDeck *m_pChannel1, *m_pChannel2, *m_pChannel3;
PreviewDeck* m_pPreview1;
+ static const QString m_sMasterGroup;
+ static const QString m_sInternalClockGroup;
static const QString m_sGroup1;
static const QString m_sGroup2;
static const QString m_sGroup3;
- static const QString m_sMasterGroup;
- static const QString m_sInternalClockGroup;
static const QString m_sPreviewGroup;
static const QString m_sSamplerGroup;
static const double kDefaultRateRange;
@@ -234,5 +233,3 @@ class SignalPathTest : public BaseSignalPathTest {
loadTrack(m_pMixerDeck3, pTrack);
}
};
-
-#endif /* ENGINEBACKENDTEST_H_ */