From 4ba7427fa0f4c8495df331829eb67b27be9c9078 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 1 Mar 2014 07:25:17 +0100 Subject: util/{Const,Writable}Buffer: add operator[] --- test/test_pcm_channels.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/test_pcm_channels.cxx') diff --git a/test/test_pcm_channels.cxx b/test/test_pcm_channels.cxx index 85ad0c248..a36fb39f3 100644 --- a/test/test_pcm_channels.cxx +++ b/test/test_pcm_channels.cxx @@ -39,7 +39,7 @@ PcmChannelsTest::TestChannels16() CPPUNIT_ASSERT_EQUAL(N, dest.size); for (unsigned i = 0; i < N; ++i) CPPUNIT_ASSERT_EQUAL(int16_t((src[i * 2] + src[i * 2 + 1]) / 2), - dest.data[i]); + dest[i]); /* mono to stereo */ @@ -47,8 +47,8 @@ PcmChannelsTest::TestChannels16() CPPUNIT_ASSERT(!dest.IsNull()); CPPUNIT_ASSERT_EQUAL(N * 4, dest.size); for (unsigned i = 0; i < N; ++i) { - CPPUNIT_ASSERT_EQUAL(src[i], dest.data[i * 2]); - CPPUNIT_ASSERT_EQUAL(src[i], dest.data[i * 2 + 1]); + CPPUNIT_ASSERT_EQUAL(src[i], dest[i * 2]); + CPPUNIT_ASSERT_EQUAL(src[i], dest[i * 2 + 1]); } } @@ -67,7 +67,7 @@ PcmChannelsTest::TestChannels32() CPPUNIT_ASSERT_EQUAL(N, dest.size); for (unsigned i = 0; i < N; ++i) CPPUNIT_ASSERT_EQUAL(int32_t(((int64_t)src[i * 2] + (int64_t)src[i * 2 + 1]) / 2), - dest.data[i]); + dest[i]); /* mono to stereo */ @@ -75,7 +75,7 @@ PcmChannelsTest::TestChannels32() CPPUNIT_ASSERT(!dest.IsNull()); CPPUNIT_ASSERT_EQUAL(N * 4, dest.size); for (unsigned i = 0; i < N; ++i) { - CPPUNIT_ASSERT_EQUAL(src[i], dest.data[i * 2]); - CPPUNIT_ASSERT_EQUAL(src[i], dest.data[i * 2 + 1]); + CPPUNIT_ASSERT_EQUAL(src[i], dest[i * 2]); + CPPUNIT_ASSERT_EQUAL(src[i], dest[i * 2 + 1]); } } -- cgit v1.2.3