diff options
author | mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-27 13:39:14 +0000 |
---|---|---|
committer | mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-27 13:39:14 +0000 |
commit | 9cb5177619f09a03e82e438fc1c4ab558e75071b (patch) | |
tree | 5422f204dfc381b92f1ab499ffa5f43e344a5e52 /bench/MathBench.cpp | |
parent | bdaed95e3f586a9f184a24e70ad854dceef35d56 (diff) |
Fix asan build. Duh, don't return a stack address...
BUG=
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/25026004
git-svn-id: http://skia.googlecode.com/svn/trunk@11497 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/MathBench.cpp')
-rw-r--r-- | bench/MathBench.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp index 260159f3f0..abe04e13d7 100644 --- a/bench/MathBench.cpp +++ b/bench/MathBench.cpp @@ -514,15 +514,16 @@ private: template <typename T> class DivModBench : public SkBenchmark { - const char* fName; + SkString fName; public: - explicit DivModBench(const char* name) : fName(name) { + explicit DivModBench(const char* name) { + fName.printf("divmod_%s", name); fIsRendering = false; } protected: virtual const char* onGetName() { - return SkStringPrintf("divmod_%s", fName).c_str(); + return fName.c_str(); } virtual void onDraw(SkCanvas*) { |