From 36802bd18b7b4e8c87fa019c7e3068bee330d174 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 Nov 2014 11:31:17 -0800 Subject: C++11 compatibility. * Fix string literal concatenation to not be interpreted as UD literals. * Add constexpr compatibility for non-integral static members. * Use __typeof__ instead of typeof (should become decltype once this actually becomes C++11). * Add an appropriate cast for atomic_uintptr_t, since moving to C++11 means moving from to , which has better typechecking (hooray for not macros!). Bug: 18466763 Change-Id: I9561dcb2526578687819ff85421ba80d8e1a9694 --- cmds/stagefright/SineSource.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmds') diff --git a/cmds/stagefright/SineSource.h b/cmds/stagefright/SineSource.h index d772e0d..be05661 100644 --- a/cmds/stagefright/SineSource.h +++ b/cmds/stagefright/SineSource.h @@ -3,6 +3,7 @@ #define SINE_SOURCE_H_ #include +#include namespace android { @@ -24,7 +25,7 @@ protected: private: enum { kBufferSize = 8192 }; - static const double kFrequency = 500.0; + static const CONSTEXPR double kFrequency = 500.0; bool mStarted; int32_t mSampleRate; -- cgit v1.1