Replace NULL macros with nullptr literals.
Change-Id: I918c40879aa547438f77e7d1a95fa2aa33bec398
diff --git a/tests/cppallocation/Android.mk b/tests/cppallocation/Android.mk
index 2e46c9e..36ea7cb 100644
--- a/tests/cppallocation/Android.mk
+++ b/tests/cppallocation/Android.mk
@@ -11,6 +11,7 @@
LOCAL_STATIC_LIBRARIES := \
libRScpp_static
+LOCAL_CFLAGS := -std=c++11
LOCAL_LDFLAGS += -llog -ldl
LOCAL_MODULE:= rstest-cppallocation
diff --git a/tests/cppbasic-getpointer/Android.mk b/tests/cppbasic-getpointer/Android.mk
index eb4ac34..b2222c6 100644
--- a/tests/cppbasic-getpointer/Android.mk
+++ b/tests/cppbasic-getpointer/Android.mk
@@ -15,6 +15,8 @@
intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,)
+LOCAL_CFLAGS := -std=c++11
+
LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include
LOCAL_C_INCLUDES += frameworks/rs/cpp
LOCAL_C_INCLUDES += frameworks/rs
diff --git a/tests/cppbasic-shared/Android.mk b/tests/cppbasic-shared/Android.mk
index 63cd715..34826a0 100644
--- a/tests/cppbasic-shared/Android.mk
+++ b/tests/cppbasic-shared/Android.mk
@@ -15,6 +15,8 @@
intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,)
+LOCAL_CFLAGS := -std=c++11
+
LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include
LOCAL_C_INCLUDES += frameworks/rs/cpp
LOCAL_C_INCLUDES += frameworks/rs
diff --git a/tests/cppbasic-shared/compute.cpp b/tests/cppbasic-shared/compute.cpp
index d93b453..6741d7a 100644
--- a/tests/cppbasic-shared/compute.cpp
+++ b/tests/cppbasic-shared/compute.cpp
@@ -42,7 +42,7 @@
sc->set_elem(e);
sc->set_type(t);
sc->set_script(sc);
- sc->set_script(NULL);
+ sc->set_script(nullptr);
sp<const Sampler> samp = Sampler::CLAMP_NEAREST(rs);
sc->set_sampler(samp);
diff --git a/tests/cppbasic/Android.mk b/tests/cppbasic/Android.mk
index d4f7441..9e24dca 100644
--- a/tests/cppbasic/Android.mk
+++ b/tests/cppbasic/Android.mk
@@ -11,6 +11,7 @@
LOCAL_STATIC_LIBRARIES := \
libRScpp_static
+LOCAL_CFLAGS := -std=c++11
LOCAL_LDFLAGS += -llog -ldl
LOCAL_MODULE:= rstest-compute
diff --git a/tests/cppbasic/compute.cpp b/tests/cppbasic/compute.cpp
index d93b453..6741d7a 100644
--- a/tests/cppbasic/compute.cpp
+++ b/tests/cppbasic/compute.cpp
@@ -42,7 +42,7 @@
sc->set_elem(e);
sc->set_type(t);
sc->set_script(sc);
- sc->set_script(NULL);
+ sc->set_script(nullptr);
sp<const Sampler> samp = Sampler::CLAMP_NEAREST(rs);
sc->set_sampler(samp);
diff --git a/tests/cppstrided/Android.mk b/tests/cppstrided/Android.mk
index 9fb98a6..253a104 100644
--- a/tests/cppstrided/Android.mk
+++ b/tests/cppstrided/Android.mk
@@ -11,6 +11,7 @@
LOCAL_STATIC_LIBRARIES := \
libRScpp_static
+LOCAL_CFLAGS := -std=c++11
LOCAL_LDFLAGS += -llog -ldl
LOCAL_MODULE:= rstest-cppstrided
diff --git a/tests/latency/Android.mk b/tests/latency/Android.mk
index fdfa208..5200e5d 100644
--- a/tests/latency/Android.mk
+++ b/tests/latency/Android.mk
@@ -11,6 +11,7 @@
LOCAL_STATIC_LIBRARIES := \
libRScpp_static
+LOCAL_CFLAGS := -std=c++11
LOCAL_LDFLAGS += -llog -ldl
LOCAL_MODULE:= rstest-latency
diff --git a/tests/latency/latency.cpp b/tests/latency/latency.cpp
index 05337be..274a518 100644
--- a/tests/latency/latency.cpp
+++ b/tests/latency/latency.cpp
@@ -74,7 +74,7 @@
struct timeval start, stop;
- gettimeofday(&start, NULL);
+ gettimeofday(&start, nullptr);
for (int i = 0; i < iters; i++) {
sc->forEach_root(ain, aout);
@@ -82,13 +82,13 @@
rs->finish();
- gettimeofday(&stop, NULL);
+ gettimeofday(&stop, nullptr);
long long elapsed = (stop.tv_sec * 1000000) - (start.tv_sec * 1000000) + (stop.tv_usec - start.tv_usec);
printf("elapsed time : %lld microseconds\n", elapsed);
printf("time per iter: %f microseconds\n", (double)elapsed / iters);
- gettimeofday(&start, NULL);
+ gettimeofday(&start, nullptr);
for (int i = 0; i < iters; i++) {
ain->copy1DFrom(buf);
@@ -98,7 +98,7 @@
rs->finish();
- gettimeofday(&stop, NULL);
+ gettimeofday(&stop, nullptr);
elapsed = (stop.tv_sec * 1000000) - (start.tv_sec * 1000000) + (stop.tv_usec - start.tv_usec);
printf("elapsed time with copy : %lld microseconds\n", elapsed);
printf("time per iter with copy: %f microseconds\n", (double)elapsed / iters);
diff --git a/tests/typecheck/Android.mk b/tests/typecheck/Android.mk
index c34e3e2..f63684e 100644
--- a/tests/typecheck/Android.mk
+++ b/tests/typecheck/Android.mk
@@ -11,6 +11,7 @@
LOCAL_STATIC_LIBRARIES := \
libRScpp_static
+LOCAL_CFLAGS := -std=c++11
LOCAL_LDFLAGS += -llog -ldl
LOCAL_MODULE:= rstest-typecheck