summaryrefslogtreecommitdiffstats
path: root/services/camera
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-11-20 23:47:28 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-20 23:47:28 +0000
commitd0e12a161471823d1ab269cb608be3f3b0a71ed1 (patch)
treef9a2f2ea19f528495278c1b651db5d75c8306869 /services/camera
parent75cfc881e25a9d7647701526484b5885dc43c574 (diff)
parent902dc42d79b075395d484ce1c71f215b199aaa2a (diff)
downloadframeworks_av-d0e12a161471823d1ab269cb608be3f3b0a71ed1.zip
frameworks_av-d0e12a161471823d1ab269cb608be3f3b0a71ed1.tar.gz
frameworks_av-d0e12a161471823d1ab269cb608be3f3b0a71ed1.tar.bz2
am 902dc42d: am 07715ac3: Merge "C++11 compatibility."
* commit '902dc42d79b075395d484ce1c71f215b199aaa2a': C++11 compatibility.
Diffstat (limited to 'services/camera')
-rw-r--r--services/camera/libcameraservice/api1/client2/Parameters.h6
-rw-r--r--services/camera/libcameraservice/device1/CameraHardwareInterface.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/services/camera/libcameraservice/api1/client2/Parameters.h b/services/camera/libcameraservice/api1/client2/Parameters.h
index 7e5be84..e628a7e 100644
--- a/services/camera/libcameraservice/api1/client2/Parameters.h
+++ b/services/camera/libcameraservice/api1/client2/Parameters.h
@@ -19,11 +19,13 @@
#include <system/graphics.h>
+#include <utils/Compat.h>
#include <utils/Errors.h>
+#include <utils/KeyedVector.h>
#include <utils/Mutex.h>
#include <utils/String8.h>
#include <utils/Vector.h>
-#include <utils/KeyedVector.h>
+
#include <camera/CameraParameters.h>
#include <camera/CameraParameters2.h>
#include <camera/CameraMetadata.h>
@@ -187,7 +189,7 @@ struct Parameters {
static const int MAX_INITIAL_PREVIEW_WIDTH = 1920;
static const int MAX_INITIAL_PREVIEW_HEIGHT = 1080;
// Aspect ratio tolerance
- static const float ASPECT_RATIO_TOLERANCE = 0.001;
+ static const CONSTEXPR float ASPECT_RATIO_TOLERANCE = 0.001;
// Full static camera info, object owned by someone else, such as
// Camera2Device.
diff --git a/services/camera/libcameraservice/device1/CameraHardwareInterface.h b/services/camera/libcameraservice/device1/CameraHardwareInterface.h
index 6386838..1935c2b 100644
--- a/services/camera/libcameraservice/device1/CameraHardwareInterface.h
+++ b/services/camera/libcameraservice/device1/CameraHardwareInterface.h
@@ -588,7 +588,7 @@ private:
#ifndef container_of
#define container_of(ptr, type, member) ({ \
- const typeof(((type *) 0)->member) *__mptr = (ptr); \
+ const __typeof__(((type *) 0)->member) *__mptr = (ptr); \
(type *) ((char *) __mptr - (char *)(&((type *)0)->member)); })
#endif