samplecode: Avoid temporary variables of SkString type.

Just like most of the other samples, just pass the name of the sample directly.

R=epoger@google.com

Review URL: https://codereview.appspot.com/6572047

git-svn-id: http://skia.googlecode.com/svn/trunk@5743 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
tfarina@chromium.org 2012-09-30 11:30:01 +00:00
Родитель e8d29f5058
Коммит 45369a33bb
5 изменённых файлов: 7 добавлений и 14 удалений

Просмотреть файл

@ -259,10 +259,8 @@ public:
protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {
if (SampleCode::TitleQ(*evt))
{
SkString str("Patch");
SampleCode::TitleR(evt, str.c_str());
if (SampleCode::TitleQ(*evt)) {
SampleCode::TitleR(evt, "Patch");
return true;
}
return this->INHERITED::onQuery(evt);

Просмотреть файл

@ -77,8 +77,7 @@ protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {
if (SampleCode::TitleQ(*evt)) {
SkString str("PolyToPolyView");
SampleCode::TitleR(evt, str.c_str());
SampleCode::TitleR(evt, "PolyToPolyView");
return true;
}
return this->INHERITED::onQuery(evt);

Просмотреть файл

@ -53,8 +53,7 @@ protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {
if (SampleCode::TitleQ(*evt)) {
SkString str("TextAlpha");
SampleCode::TitleR(evt, str.c_str());
SampleCode::TitleR(evt, "TextAlpha");
return true;
}
return this->INHERITED::onQuery(evt);

Просмотреть файл

@ -63,8 +63,7 @@ protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {
if (SampleCode::TitleQ(*evt)) {
SkString str("TextBox");
SampleCode::TitleR(evt, str.c_str());
SampleCode::TitleR(evt, "TextBox");
return true;
}
return this->INHERITED::onQuery(evt);

Просмотреть файл

@ -79,10 +79,8 @@ public:
protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {
if (SampleCode::TitleQ(*evt))
{
SkString str("Vertices");
SampleCode::TitleR(evt, str.c_str());
if (SampleCode::TitleQ(*evt)) {
SampleCode::TitleR(evt, "Vertices");
return true;
}
return this->INHERITED::onQuery(evt);