From 7d72c9e5ad10e85789a0bc2e63c3f918c609ae49 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Tue, 15 Nov 2016 12:10:46 -0800 Subject: Remove unneeded using namespace statements. * To suppress clang-tidy warnings on the "using namespace ..." statements. * Most of them can be removed because "using namespace android::RSC" is already in the generated ScriptC_*.h files. Bug: 32670901 Test: build with WITH_TIDY=1 Change-Id: I493e5043a3240bbd1c1fdaca8a69855222b728f6 --- tests/cppallocation/compute.cpp | 3 --- tests/cppbasic-getpointer/compute.cpp | 3 --- tests/cppbasic-shared/compute.cpp | 3 --- tests/cppbasic/compute.cpp | 3 --- tests/cppf16/compute.cpp | 7 +++++-- tests/cppstrided/compute.cpp | 3 --- tests/latency/latency.cpp | 3 --- tests/lldb/cpp/Allocations/Allocations.cpp | 3 --- tests/lldb/cpp/BranchingFunCalls/BranchingFunCalls.cpp | 3 --- tests/lldb/cpp/InfiniteLoop/InfiniteLoop.cpp | 3 --- tests/lldb/cpp/KernelVariables/KernelVariables.cpp | 3 --- tests/lldb/cpp/MultipleRSFiles/MultipleRSFiles.cpp | 3 --- tests/lldb/cpp/WaitAttach/WaitAttach.cpp | 3 --- tests/lldb/jni/Allocations/jniallocations/jniallocations.cpp | 3 --- .../jnibranchingfuncalls/jnibranchingfuncalls.cpp | 3 --- .../jni/DebugWaitAttach/jnidebugwaitattach/jnidebugwaitattach.cpp | 3 --- tests/lldb/jni/InfiniteLoop/jniinfiniteloop/jniinfiniteloop.cpp | 3 --- .../jni/KernelVariables/jnikernelvariables/jnikernelvariables.cpp | 3 --- .../jni/MultipleRSFiles/jnimultiplersfiles/jnimultiplersfiles.cpp | 3 --- .../jninodebugwaitattach/jninodebugwaitattach.cpp | 3 --- tests/typecheck/typecheck.cpp | 3 --- 21 files changed, 5 insertions(+), 62 deletions(-) diff --git a/tests/cppallocation/compute.cpp b/tests/cppallocation/compute.cpp index d1769588..eebb2c52 100644 --- a/tests/cppallocation/compute.cpp +++ b/tests/cppallocation/compute.cpp @@ -3,9 +3,6 @@ #include "ScriptC_multiply.h" -using namespace android; -using namespace RSC; - int main(int argc, char** argv) { diff --git a/tests/cppbasic-getpointer/compute.cpp b/tests/cppbasic-getpointer/compute.cpp index 307bec0b..6850053c 100644 --- a/tests/cppbasic-getpointer/compute.cpp +++ b/tests/cppbasic-getpointer/compute.cpp @@ -5,9 +5,6 @@ #include -using namespace android; -using namespace RSC; - const uint32_t DIMX = 128; const uint32_t DIMY = 128; diff --git a/tests/cppbasic-shared/compute.cpp b/tests/cppbasic-shared/compute.cpp index 6741d7af..829ef879 100644 --- a/tests/cppbasic-shared/compute.cpp +++ b/tests/cppbasic-shared/compute.cpp @@ -3,9 +3,6 @@ #include "ScriptC_mono.h" -using namespace android; -using namespace RSC; - int test_compute() { bool failed = false; diff --git a/tests/cppbasic/compute.cpp b/tests/cppbasic/compute.cpp index 6741d7af..829ef879 100644 --- a/tests/cppbasic/compute.cpp +++ b/tests/cppbasic/compute.cpp @@ -3,9 +3,6 @@ #include "ScriptC_mono.h" -using namespace android; -using namespace RSC; - int test_compute() { bool failed = false; diff --git a/tests/cppf16/compute.cpp b/tests/cppf16/compute.cpp index 0ced332a..e4ca8413 100644 --- a/tests/cppf16/compute.cpp +++ b/tests/cppf16/compute.cpp @@ -1,7 +1,10 @@ #include "RenderScript.h" -using namespace android; -using namespace RSC; +using android::RSC::Allocation; +using android::RSC::Element; +using android::RSC::RS; +using android::RSC::Type; +using android::RSC::sp; static const uint32_t dimX = 7, dimY = 5, dimZ = 3; diff --git a/tests/cppstrided/compute.cpp b/tests/cppstrided/compute.cpp index 819bcdca..73606b7e 100644 --- a/tests/cppstrided/compute.cpp +++ b/tests/cppstrided/compute.cpp @@ -3,9 +3,6 @@ #include "ScriptC_multiply.h" -using namespace android; -using namespace RSC; - int main(int argc, char** argv) { diff --git a/tests/latency/latency.cpp b/tests/latency/latency.cpp index 274a5187..c4b06123 100644 --- a/tests/latency/latency.cpp +++ b/tests/latency/latency.cpp @@ -3,9 +3,6 @@ #include "ScriptC_latency.h" -using namespace android; -using namespace RSC; - int main(int argc, char** argv) { int iters = 100; diff --git a/tests/lldb/cpp/Allocations/Allocations.cpp b/tests/lldb/cpp/Allocations/Allocations.cpp index d6fc6ae0..d575387a 100644 --- a/tests/lldb/cpp/Allocations/Allocations.cpp +++ b/tests/lldb/cpp/Allocations/Allocations.cpp @@ -2,9 +2,6 @@ #include "ScriptC_allocs.h" -using namespace android; -using namespace RSC; - sp mRS; sp mBoolAllocation; // boolean diff --git a/tests/lldb/cpp/BranchingFunCalls/BranchingFunCalls.cpp b/tests/lldb/cpp/BranchingFunCalls/BranchingFunCalls.cpp index cca53fce..dafd1ce4 100644 --- a/tests/lldb/cpp/BranchingFunCalls/BranchingFunCalls.cpp +++ b/tests/lldb/cpp/BranchingFunCalls/BranchingFunCalls.cpp @@ -2,9 +2,6 @@ #include "ScriptC_scalars.h" -using namespace android; -using namespace RSC; - int main() { static const int size = 64; diff --git a/tests/lldb/cpp/InfiniteLoop/InfiniteLoop.cpp b/tests/lldb/cpp/InfiniteLoop/InfiniteLoop.cpp index ca7b9c74..6734c343 100644 --- a/tests/lldb/cpp/InfiniteLoop/InfiniteLoop.cpp +++ b/tests/lldb/cpp/InfiniteLoop/InfiniteLoop.cpp @@ -5,9 +5,6 @@ #include "ScriptC_infiniteloop.h" -using namespace android; -using namespace RSC; - int main() { static const int size = 64; diff --git a/tests/lldb/cpp/KernelVariables/KernelVariables.cpp b/tests/lldb/cpp/KernelVariables/KernelVariables.cpp index 25f75750..095c1ada 100644 --- a/tests/lldb/cpp/KernelVariables/KernelVariables.cpp +++ b/tests/lldb/cpp/KernelVariables/KernelVariables.cpp @@ -2,9 +2,6 @@ #include "ScriptC_simple.h" -using namespace android; -using namespace RSC; - int main() { static const int size = 64; diff --git a/tests/lldb/cpp/MultipleRSFiles/MultipleRSFiles.cpp b/tests/lldb/cpp/MultipleRSFiles/MultipleRSFiles.cpp index c009710f..98a1b825 100644 --- a/tests/lldb/cpp/MultipleRSFiles/MultipleRSFiles.cpp +++ b/tests/lldb/cpp/MultipleRSFiles/MultipleRSFiles.cpp @@ -3,9 +3,6 @@ #include "ScriptC_first.h" #include "ScriptC_second.h" -using namespace android; -using namespace RSC; - int main() { static const int size = 64; diff --git a/tests/lldb/cpp/WaitAttach/WaitAttach.cpp b/tests/lldb/cpp/WaitAttach/WaitAttach.cpp index 4da5e970..13a7c08c 100644 --- a/tests/lldb/cpp/WaitAttach/WaitAttach.cpp +++ b/tests/lldb/cpp/WaitAttach/WaitAttach.cpp @@ -2,9 +2,6 @@ #include "ScriptC_simple.h" -using namespace android; -using namespace RSC; - int main() { static const int size = 8; diff --git a/tests/lldb/jni/Allocations/jniallocations/jniallocations.cpp b/tests/lldb/jni/Allocations/jniallocations/jniallocations.cpp index ef66237a..0cf1237c 100644 --- a/tests/lldb/jni/Allocations/jniallocations/jniallocations.cpp +++ b/tests/lldb/jni/Allocations/jniallocations/jniallocations.cpp @@ -5,9 +5,6 @@ #include "ScriptC_allocs.h" -using namespace android; -using namespace RSC; - sp mRS; sp mBoolAllocation; // boolean diff --git a/tests/lldb/jni/BranchingFunCalls/jnibranchingfuncalls/jnibranchingfuncalls.cpp b/tests/lldb/jni/BranchingFunCalls/jnibranchingfuncalls/jnibranchingfuncalls.cpp index 4f39b109..42634ffe 100644 --- a/tests/lldb/jni/BranchingFunCalls/jnibranchingfuncalls/jnibranchingfuncalls.cpp +++ b/tests/lldb/jni/BranchingFunCalls/jnibranchingfuncalls/jnibranchingfuncalls.cpp @@ -5,9 +5,6 @@ #include "ScriptC_scalars.h" -using namespace android; -using namespace RSC; - extern "C" void JNICALL Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS( JNIEnv * env, diff --git a/tests/lldb/jni/DebugWaitAttach/jnidebugwaitattach/jnidebugwaitattach.cpp b/tests/lldb/jni/DebugWaitAttach/jnidebugwaitattach/jnidebugwaitattach.cpp index 2de68a51..c89d6a39 100644 --- a/tests/lldb/jni/DebugWaitAttach/jnidebugwaitattach/jnidebugwaitattach.cpp +++ b/tests/lldb/jni/DebugWaitAttach/jnidebugwaitattach/jnidebugwaitattach.cpp @@ -5,9 +5,6 @@ #include "ScriptC_simple.h" -using namespace android; -using namespace RSC; - extern "C" void JNICALL Java_com_android_rs_jnidebugwaitattach_MainActivity_nativeRS( JNIEnv * env, diff --git a/tests/lldb/jni/InfiniteLoop/jniinfiniteloop/jniinfiniteloop.cpp b/tests/lldb/jni/InfiniteLoop/jniinfiniteloop/jniinfiniteloop.cpp index 7ef2e4c5..5e8156d0 100644 --- a/tests/lldb/jni/InfiniteLoop/jniinfiniteloop/jniinfiniteloop.cpp +++ b/tests/lldb/jni/InfiniteLoop/jniinfiniteloop/jniinfiniteloop.cpp @@ -6,9 +6,6 @@ #include "ScriptC_infiniteloop.h" -using namespace android; -using namespace RSC; - extern "C" void JNICALL Java_com_android_rs_jniinfiniteloop_MainActivity_nativeRS( JNIEnv * env, diff --git a/tests/lldb/jni/KernelVariables/jnikernelvariables/jnikernelvariables.cpp b/tests/lldb/jni/KernelVariables/jnikernelvariables/jnikernelvariables.cpp index 9a17fdc9..db0e2c4d 100644 --- a/tests/lldb/jni/KernelVariables/jnikernelvariables/jnikernelvariables.cpp +++ b/tests/lldb/jni/KernelVariables/jnikernelvariables/jnikernelvariables.cpp @@ -5,9 +5,6 @@ #include "ScriptC_simple.h" -using namespace android; -using namespace RSC; - extern "C" void JNICALL Java_com_android_rs_jnikernelvariables_MainActivity_nativeRS( JNIEnv * env, diff --git a/tests/lldb/jni/MultipleRSFiles/jnimultiplersfiles/jnimultiplersfiles.cpp b/tests/lldb/jni/MultipleRSFiles/jnimultiplersfiles/jnimultiplersfiles.cpp index 462292ea..792f810d 100644 --- a/tests/lldb/jni/MultipleRSFiles/jnimultiplersfiles/jnimultiplersfiles.cpp +++ b/tests/lldb/jni/MultipleRSFiles/jnimultiplersfiles/jnimultiplersfiles.cpp @@ -6,9 +6,6 @@ #include "ScriptC_first.h" #include "ScriptC_second.h" -using namespace android; -using namespace RSC; - extern "C" void JNICALL Java_com_android_rs_jnimultiplersfiles_MainActivity_nativeRS( JNIEnv * env, diff --git a/tests/lldb/jni/NoDebugWaitAttach/jninodebugwaitattach/jninodebugwaitattach.cpp b/tests/lldb/jni/NoDebugWaitAttach/jninodebugwaitattach/jninodebugwaitattach.cpp index 6a99f58c..23b6334f 100644 --- a/tests/lldb/jni/NoDebugWaitAttach/jninodebugwaitattach/jninodebugwaitattach.cpp +++ b/tests/lldb/jni/NoDebugWaitAttach/jninodebugwaitattach/jninodebugwaitattach.cpp @@ -5,9 +5,6 @@ #include "ScriptC_simple.h" -using namespace android; -using namespace RSC; - extern "C" void JNICALL Java_com_android_rs_jninodebugwaitattach_MainActivity_nativeRS( JNIEnv * env, diff --git a/tests/typecheck/typecheck.cpp b/tests/typecheck/typecheck.cpp index c270306b..93ed93ec 100644 --- a/tests/typecheck/typecheck.cpp +++ b/tests/typecheck/typecheck.cpp @@ -17,9 +17,6 @@ #include "RenderScript.h" #include "ScriptC_kernels.h" -using namespace android; -using namespace RSC; - const static uint32_t x = 7; sp createAlloc(const sp& rs, const sp& e) { -- cgit v1.2.3