projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c801535
)
Cleanup: use a lambda.
author
Carl Hetherington
<cth@carlh.net>
Sat, 30 Sep 2023 20:58:45 +0000
(22:58 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 30 Sep 2023 20:58:45 +0000
(22:58 +0200)
test/audio_analysis_test.cc
patch
|
blob
|
history
diff --git
a/test/audio_analysis_test.cc
b/test/audio_analysis_test.cc
index 002ea0e7a16123a4f0a2b13e49f78f9163cd56af..39abe7e48197325048f9afd3a6211594f3eaf0e2 100644
(file)
--- a/
test/audio_analysis_test.cc
+++ b/
test/audio_analysis_test.cc
@@
-148,15
+148,6
@@
BOOST_AUTO_TEST_CASE (audio_analysis_test2)
}
}
-static bool done = false;
-
-static void
-analysis_finished ()
-{
- done = true;
-}
-
-
/* Test a case which was reported to throw an exception; analysing
* a 12-channel DCP's audio.
*/
/* Test a case which was reported to throw an exception; analysing
* a 12-channel DCP's audio.
*/
@@
-173,7
+164,8
@@
BOOST_AUTO_TEST_CASE (audio_analysis_test3)
film->set_audio_channels (12);
boost::signals2::connection connection;
film->set_audio_channels (12);
boost::signals2::connection connection;
- JobManager::instance()->analyse_audio(film, film->playlist(), false, connection, boost::bind(&analysis_finished));
+ bool done = false;
+ JobManager::instance()->analyse_audio(film, film->playlist(), false, connection, [&done](Job::Result) { done = true; });
BOOST_REQUIRE (!wait_for_jobs());
BOOST_CHECK (done);
}
BOOST_REQUIRE (!wait_for_jobs());
BOOST_CHECK (done);
}