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/rsProgramStore.cpp b/rsProgramStore.cpp index 3ee75cc..79cc149 100644 --- a/rsProgramStore.cpp +++ b/rsProgramStore.cpp
@@ -17,9 +17,8 @@ #include "rsContext.h" #include "rsProgramStore.h" -using namespace android; -using namespace android::renderscript; - +namespace android { +namespace renderscript { ProgramStore::ProgramStore(Context *rsc, bool colorMaskR, bool colorMaskG, bool colorMaskB, bool colorMaskA, @@ -140,9 +139,6 @@ } -namespace android { -namespace renderscript { - RsProgramStore rsi_ProgramStoreCreate(Context *rsc, bool colorMaskR, bool colorMaskG, bool colorMaskB, bool colorMaskA, bool depthMask, bool ditherEnable, @@ -159,5 +155,5 @@ return ps.get(); } -} -} +} // namespace renderscript +} // namespace android