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

Unified Diff: gm/filterbitmap.cpp

Issue 20373002: clean up printf usage in gm (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Clean up printf usage in recent gms Created 7 years, 5 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 | « gm/downsamplebitmap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/filterbitmap.cpp
diff --git a/gm/filterbitmap.cpp b/gm/filterbitmap.cpp
index 4a1b89e4372edc6bd7649a556d79c1c988766c3f..1ec6c8f378b8331195ef6869af61abf2e3c8dfc4 100644
--- a/gm/filterbitmap.cpp
+++ b/gm/filterbitmap.cpp
@@ -64,10 +64,6 @@ public:
this->setBGColor(0xFFDDDDDD);
}
- void setName(const char name[]) {
- fName.set(name);
- }
-
protected:
virtual SkString onShortName() SK_OVERRIDE {
return fName;
@@ -102,9 +98,7 @@ class FilterBitmapTextGM: public FilterBitmapGM {
FilterBitmapTextGM(float textSize)
: fTextSize(textSize)
{
- char name[1024];
- sprintf(name, "filterbitmap_text_%.2fpt", fTextSize);
- setName(name);
+ fName.printf("filterbitmap_text_%.2fpt", fTextSize);
}
protected:
@@ -143,9 +137,7 @@ class FilterBitmapCheckerboardGM: public FilterBitmapGM {
FilterBitmapCheckerboardGM(int size, int num_checks)
: fSize(size), fNumChecks(num_checks)
{
- char name[1024];
- sprintf(name, "filterbitmap_checkerboard_%d_%d", fSize, fNumChecks);
- setName(name);
+ fName.printf("filterbitmap_checkerboard_%d_%d", fSize, fNumChecks);
}
protected:
@@ -182,9 +174,7 @@ class FilterBitmapImageGM: public FilterBitmapGM {
FilterBitmapImageGM(const char filename[])
: fFilename(filename)
{
- char name[1024];
- sprintf(name, "filterbitmap_image_%s", filename);
- setName(name);
+ fName.printf("filterbitmap_image_%s", filename);
}
protected:
« no previous file with comments | « gm/downsamplebitmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698