Skip to content

Commit 9fbbf7b

Browse files
committed
Improve the description of DEBUG_ASSERT() and fix typos.
1 parent e869551 commit 9fbbf7b

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/library/analysis/analysisfeature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ AnalysisFeature::AnalysisFeature(
5757

5858
AnalysisFeature::~AnalysisFeature() {
5959
// We need to delete m_pTrackAnalysisScheduler here immediately synchronously,
60-
// waiting for pending threads to have finished, to not killthem during exit
60+
// waiting for pending threads to have finished, to not kill them during exit
6161
delete m_pTrackAnalysisScheduler.release();
6262
}
6363

src/mixer/playermanager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ PlayerManager::~PlayerManager() {
152152
m_microphones.clear();
153153
m_auxiliaries.clear();
154154
// We need to delete m_pTrackAnalysisScheduler here immediately synchronously,
155-
// waiting for pending threads to have finished, to not killthem during exit
155+
// waiting for pending threads to have finished, to not kill them during exit
156156
delete m_pTrackAnalysisScheduler.release();
157157
}
158158

src/util/assert.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,17 @@ inline void mixxx_release_assert(const char* assertion, const char* file, int li
4444
} \
4545
while (0)
4646

47-
/// Checks that cond is true in debug builds. If cond is false then prints a
48-
/// warning message to the console. If Mixxx is built with
49-
/// MIXXX_DEBUG_ASSERTIONS_FATAL then the warning message is fatal. Compiles
50-
/// to nothing in release builds.
47+
/// Verifies that `cond` evaluates to `true` in debug builds. If not, a
48+
/// critical error message is printed. If Mixxx is built with
49+
/// `MIXXX_DEBUG_ASSERTIONS_FATAL`, the process is terminated or
50+
/// it breaks with SIGINT under gdb with command line option
51+
/// --debug-assert-break
5152
///
52-
/// In release builds, it marks cond as used and checks if it can be converted
53-
/// to bool. Be careful of the common mistake with assertions:
54-
/// DEBUG_ASSERT(doSomething());
55-
/// doSomething() is never called, in In release builds.
53+
/// This macro expands to no runtime code in release builds. At compile time
54+
/// `cond` is however verified to be convertible to `bool`.
55+
/// Be careful of the common mistake with assertions:
56+
/// `DEBUG_ASSERT(doSomething());`
57+
/// `doSomething()` is never called, in In release builds.
5658
#ifdef MIXXX_DEBUG_ASSERTIONS_ENABLED
5759
#define DEBUG_ASSERT(cond) \
5860
do \

0 commit comments

Comments
 (0)