summaryrefslogtreecommitdiff
path: root/rsScript.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-11-15 15:14:05 -0800
committerChih-Hung Hsieh <chh@google.com>2016-11-16 10:29:25 -0800
commit11496ac131bb691edf5bdcab3029dceef5c1e4e1 (patch)
tree9961794b45fa6f66d3ba89754ee60372f0719d86 /rsScript.cpp
parent6babd9ca03e1379380af0c1cfde6f6d3e92ccd29 (diff)
downloadrs-11496ac131bb691edf5bdcab3029dceef5c1e4e1.tar.gz
Fix google-build-using-namespace warnings in rs.
* Most files define classes in renderscript namespace. Define them in the namespace instead of "using namespace ...". Some files define global C++ names, and we replace "using namespace ..." with using declarations of the required names. * Add "NOLINT" comment to rsg_generator.c output code to suppress such warnings. Bug: 32670901 Test: build with WITH_TIDY=1 Change-Id: I9b0edcad3e1fb37c79927b05fd58fb1a301bdf22
Diffstat (limited to 'rsScript.cpp')
-rw-r--r--rsScript.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/rsScript.cpp b/rsScript.cpp
index 4c2f52f0..8dae4190 100644
--- a/rsScript.cpp
+++ b/rsScript.cpp
@@ -17,8 +17,8 @@
#include "rsContext.h"
#include <time.h>
-using namespace android;
-using namespace android::renderscript;
+namespace android {
+namespace renderscript {
Script::Script(Context *rsc) : ObjectBase(rsc) {
memset(&mEnviroment, 0, sizeof(mEnviroment));
@@ -146,9 +146,6 @@ RsA3DClassID ScriptFieldID::getClassId() const {
}
-namespace android {
-namespace renderscript {
-
RsScriptKernelID rsi_ScriptKernelIDCreate(Context *rsc, RsScript vs, int slot, int sig) {
ScriptKernelID *kid = new ScriptKernelID(rsc, (Script *)vs, slot, sig);
kid->incUserRef();
@@ -296,5 +293,5 @@ void rsi_ScriptSetVarVE(Context *rsc, RsScript vs, uint32_t slot,
s->setVar(slot, data, len, e, dims, dimLen);
}
-}
-}
+} // namespace renderscript
+} // namespace android