am 6bafdcb5: am 4f1fe2f5: Merge "Fix build in C++11 mode"

* commit '6bafdcb5083b81d295676ee0ff75f62b31214150':
  Fix build in C++11 mode
diff --git a/tests/camera2/Android.mk b/tests/camera2/Android.mk
index 41b3a40..1128522 100644
--- a/tests/camera2/Android.mk
+++ b/tests/camera2/Android.mk
@@ -35,7 +35,6 @@
 	frameworks/native/include \
 
 LOCAL_CFLAGS += -Wall -Wextra
-LOCAL_CPPFLAGS := -std=gnu++98
 LOCAL_MODULE:= camera2_test
 LOCAL_MODULE_STEM_32 := camera2_test
 LOCAL_MODULE_STEM_64 := camera2_test64
diff --git a/tests/camera2/CameraBurstTests.cpp b/tests/camera2/CameraBurstTests.cpp
index 8dcc2a2..198c0c1 100644
--- a/tests/camera2/CameraBurstTests.cpp
+++ b/tests/camera2/CameraBurstTests.cpp
@@ -49,7 +49,7 @@
 #define dout if (0) std::cout
 #endif
 
-#define WARN_UNLESS(condition) (!(condition) ? (std::cerr) : (std::ostream(NULL)) << "Warning: ")
+#define WARN_UNLESS(condition) if(!(condition)) std::cerr << "Warning: "
 #define WARN_LE(exp, act) WARN_UNLESS((exp) <= (act))
 #define WARN_LT(exp, act) WARN_UNLESS((exp) < (act))
 #define WARN_GT(exp, act) WARN_UNLESS((exp) > (act))
@@ -219,7 +219,7 @@
         CameraMetadata tmpRequest = previewRequest;
         ASSERT_EQ(OK, tmpRequest.update(ANDROID_SENSOR_EXPOSURE_TIME,
                                         &exposures[i], 1));
-        ALOGV("Submitting capture request %d with exposure %"PRId64, i,
+        ALOGV("Submitting capture request %d with exposure %" PRId64, i,
             exposures[i]);
         dout << "Capture request " << i << " exposure is "
              << (exposures[i]/1e6f) << std::endl;
@@ -231,7 +231,7 @@
     float brightnesses[CAMERA_FRAME_BURST_COUNT];
     // Get each frame (metadata) and then the buffer. Calculate brightness.
     for (int i = 0; i < CAMERA_FRAME_BURST_COUNT; ++i) {
-        ALOGV("Reading capture request %d with exposure %"PRId64, i, exposures[i]);
+        ALOGV("Reading capture request %d with exposure %" PRId64, i, exposures[i]);
         ASSERT_EQ(OK, mDevice->waitForNextFrame(CAMERA_FRAME_TIMEOUT));
         ALOGV("Reading capture request-1 %d", i);
         CaptureResult result;
@@ -618,7 +618,7 @@
                                         &durationList[i], 1));
         ASSERT_EQ(OK, tmpRequest.update(ANDROID_SENSOR_SENSITIVITY,
                                         &sensitivityList[i], 1));
-        ALOGV("Submitting capture %zu with exposure %"PRId64", frame duration %"PRId64", sensitivity %d",
+        ALOGV("Submitting capture %zu with exposure %" PRId64 ", frame duration %" PRId64 ", sensitivity %d",
                 i, expList[i], durationList[i], sensitivityList[i]);
         dout << "Capture request " << i <<
                 ": exposure is " << (expList[i]/1e6f) << " ms" <<
diff --git a/tests/camera2/CameraMultiStreamTests.cpp b/tests/camera2/CameraMultiStreamTests.cpp
index b92d8cc..df8e623 100644
--- a/tests/camera2/CameraMultiStreamTests.cpp
+++ b/tests/camera2/CameraMultiStreamTests.cpp
@@ -356,7 +356,7 @@
             ASSERT_EQ(OK, request.update(ANDROID_SENSOR_EXPOSURE_TIME, &exposures[i], 1));
             ASSERT_EQ(OK, request.update(ANDROID_SENSOR_SENSITIVITY, &sensitivities[i], 1));
             ASSERT_EQ(OK, mDevice->capture(request));
-            ALOGV("Submitting request with: id %d with exposure %"PRId64", sensitivity %d",
+            ALOGV("Submitting request with: id %d with exposure %" PRId64 ", sensitivity %d",
                     *requestIdStart, exposures[i], sensitivities[i]);
             if (CAMERA_MULTI_STREAM_DEBUGGING) {
                 request.dump(STDOUT_FILENO);
@@ -554,7 +554,7 @@
         minFrameDuration = DEFAULT_FRAME_DURATION;
     }
 
-    ALOGV("targeted minimal frame duration is: %"PRId64"ns", minFrameDuration);
+    ALOGV("targeted minimal frame duration is: %" PRId64 "ns", minFrameDuration);
 
     GetMaxSize(jpegData, jpegCount, &jpegMaxSize, &maxIdx);
     ALOGV("Found Jpeg size max idx = %d", maxIdx);
@@ -672,7 +672,7 @@
         ASSERT_EQ(OK, previewRequest.update(
                 ANDROID_SENSOR_EXPOSURE_TIME,
                 &exposures[i], 1));
-        ALOGV("Submitting preview request %zu with exposure %"PRId64,
+        ALOGV("Submitting preview request %zu with exposure %" PRId64,
                 i, exposures[i]);
 
         ASSERT_EQ(OK, mDevice->setStreamingRequest(previewRequest));