Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: bench/MathBench.cpp

Issue 25026004: Fix asan build. Duh, don't return a stack address... (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/MathBench.cpp
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp
index 260159f3f0ebf58b513f1f16fb53e406130e9f1f..abe04e13d705cd97bb90bfe80a176fc34b0bbe79 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*) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698