aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorChun-Min Chang <[email protected]>2017-04-07 13:55:41 +0800
committerMatthew Gregan <[email protected]>2017-04-07 18:24:14 +1200
commit6e3a6aea3b1ae058cb0bed969ec4dd5e7f747df7 (patch)
treefb41e8a3a742a81b0c14e1ef994a8adcc7f6588a /test
parent2b1132b1e8aa16760fcb9d13b1f79273ac183b77 (diff)
downloadcubeb-6e3a6aea3b1ae058cb0bed969ec4dd5e7f747df7.tar.gz
cubeb-6e3a6aea3b1ae058cb0bed969ec4dd5e7f747df7.zip
Use plain std::unique_ptr and new instead of custom deleter
Diffstat (limited to 'test')
-rw-r--r--test/test_tone.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/test_tone.cpp b/test/test_tone.cpp
index 9ba54fb..c2188c5 100644
--- a/test/test_tone.cpp
+++ b/test/test_tone.cpp
@@ -112,8 +112,7 @@ TEST(cubeb, tone)
params.channels = 1;
params.layout = CUBEB_LAYOUT_MONO;
- std::unique_ptr<struct cb_user_data, decltype(&free)>
- user_data((struct cb_user_data *)calloc(1, sizeof(struct cb_user_data)), free);
+ std::unique_ptr<cb_user_data> user_data(new cb_user_data());
ASSERT_TRUE(!!user_data) << "Error allocating user data";
user_data->position = 0;