diff options
author | Yang Ni <yangni@google.com> | 2015-02-14 18:00:59 -0800 |
---|---|---|
committer | Yang Ni <yangni@google.com> | 2015-02-15 20:10:40 +0000 |
commit | b8353c5943f4038fd7f08db3d958390ce9418798 (patch) | |
tree | 2cfac49d1f790e077f40dfc7ba42904ee5658f50 /rsScriptC.cpp | |
parent | 1ce0dfd82311d4922dbffdde302599410fc25c5d (diff) | |
download | rs-b8353c5943f4038fd7f08db3d958390ce9418798.tar.gz |
Revert "Replaced android::Vector with std::vector."
b/19148482
This reverts commit 93d6bc872b7d9fba63abfa7513d56b38d9c3d371.
I also made some changes to Make it work with HEAD.
Change-Id: I5e516976ec1d85ffe1cf388c01795348a9441982
Diffstat (limited to 'rsScriptC.cpp')
-rw-r--r-- | rsScriptC.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/rsScriptC.cpp b/rsScriptC.cpp index 71761f1c..4b204d38 100644 --- a/rsScriptC.cpp +++ b/rsScriptC.cpp @@ -14,8 +14,6 @@ * limitations under the License. */ -#include <string> - #include "rsContext.h" #include "rsScriptC.h" @@ -31,6 +29,8 @@ #include <sys/stat.h> +#include <string> + #ifdef USE_MINGW /* Define the default path separator for the platform. */ #define OS_PATH_SEPARATOR '\\' @@ -195,14 +195,15 @@ void ScriptC::runForEach(Context *rsc, // Trace this function call. // To avoid overhead we only build the string if tracing is actually // enabled. - std::string *traceString = nullptr; - const char *stringData = ""; + String8 *AString = NULL; + const char *String = ""; if (ATRACE_ENABLED()) { - traceString = new std::string("runForEach_"); - traceString->append(mHal.info.exportedForeachFuncList[slot].first); - stringData = traceString->c_str(); + AString = new String8("runForEach_"); + AString->append(mHal.info.exportedForeachFuncList[slot].first); + String = AString->string(); } - ATRACE_NAME(stringData); + ATRACE_NAME(String); + (void)String; Context::PushState ps(rsc); @@ -222,8 +223,8 @@ void ScriptC::runForEach(Context *rsc, "Driver support for multi-input not present"); } - if (traceString) { - delete traceString; + if (AString) { + delete AString; } } |