summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Noble <pixel@nobis-crew.org>2013-12-18 12:03:38 -0800
committerNicolas Noble <pixel@nobis-crew.org>2013-12-18 16:12:33 -0800
commit9e2b2679cb94ba4950aa98323e4c61a3e53546e2 (patch)
tree512540f802468a1263c80093e3de08cc3348787c
parent638dcbbcf20abca150b986125264b315a8dc1f81 (diff)
MSVC doesn't like explicit initializer for arrays.
-rw-r--r--tests/test-Handles.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test-Handles.cc b/tests/test-Handles.cc
index 39c51e3..389e22b 100644
--- a/tests/test-Handles.cc
+++ b/tests/test-Handles.cc
@@ -57,15 +57,13 @@ class DiscreteCos {
}
private:
- int32_t m_cosTable[512] = {
- 16777216, // 2^24 * cos(0 * 2pi / 2048)
- 16777137, // 2^24 * cos(1 * 2pi / 2048) = C = f(1)
- };
+ int32_t m_cosTable[512];
// f(n) = cos(n * 2pi / 2048)
// f(n) = 2 * f(1) * f(n - 1) - f(n - 2)
void generate() {
- int64_t C = m_cosTable[1];
+ m_cosTable[0] = 16777216; // 2^24 * cos(0 * 2pi / 2048)
+ int64_t C = m_cosTable[1] = 16777137; // 2^24 * cos(1 * 2pi / 2048) = C = f(1);
for (int i = 2; i < 512; i++)
m_cosTable[i] = ((C * m_cosTable[i - 1]) >> 23) - m_cosTable[i - 2];