aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-28 15:13:41 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-28 15:13:41 +0000
commit6fc7cc23a9c33960b879f69d92d6fb0e1373e556 (patch)
tree64570f7ae51a2f2e2e066c0383f60d0d4936a341 /samplecode
parent0c00f21fee3f5cfa3aa7e5d46ff94cb8cf340451 (diff)
TBR=reed Review URL: http://codereview.appspot.com/5500087 git-svn-id: http://skia.googlecode.com/svn/trunk@2927 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleApp.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 746314b2b7..a1534e53fe 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
@@ -97,7 +96,7 @@ static const char* skip_past(const char* str, const char* skip) {
static const char* gPrefFileName = "sampleapp_prefs.txt";
-static bool readTiTleFromPrefs(SkString* title) {
+static bool readTitleFromPrefs(SkString* title) {
SkFILEStream stream(gPrefFileName);
if (!stream.isValid()) {
return false;
@@ -119,7 +118,7 @@ static bool readTiTleFromPrefs(SkString* title) {
return false;
}
-static bool writeTitleToPrefs(const char* title) {
+static void writeTitleToPrefs(const char* title) {
SkFILEWStream stream(gPrefFileName);
SkString data;
data.printf("curr-slide-title = \"%s\"\n", title);
@@ -711,7 +710,7 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
}
} else {
SkString title;
- if (readTiTleFromPrefs(&title)) {
+ if (readTitleFromPrefs(&title)) {
fCurrIndex = findByTitle(title.c_str());
}
}
@@ -759,6 +758,8 @@ int SampleWindow::findByTitle(const char title[]) {
return i;
}
}
+ // TODO(reed): what should this return if the title is not found?
+ return 0;
}
static SkBitmap capture_bitmap(SkCanvas* canvas) {