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
diff --git a/rsMesh.cpp b/rsMesh.cpp
index f6fbaf6..bd3070d 100644
--- a/rsMesh.cpp
+++ b/rsMesh.cpp
@@ -18,8 +18,8 @@
#include "rsMesh.h"
#include "rs.h"
-using namespace android;
-using namespace android::renderscript;
+namespace android {
+namespace renderscript {
Mesh::Mesh(Context *rsc) : ObjectBase(rsc) {
mHal.drv = nullptr;
@@ -263,9 +263,6 @@
}
}
-namespace android {
-namespace renderscript {
-
RsMesh rsi_MeshCreate(Context *rsc,
RsAllocation * vtx, size_t vtxCount,
RsAllocation * idx, size_t idxCount,
@@ -287,4 +284,5 @@
return sm;
}
-}}
+} // namespace renderscript
+} // namespace android