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

Unified Diff: tools/flags/SkCommandLineFlags.cpp

Issue 12440067: Change the name of SkFlags to SkCommandLineFlags. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: ParseCommandLine -> Parse Created 7 years, 9 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 | « tools/flags/SkCommandLineFlags.h ('k') | tools/render_pictures_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/flags/SkCommandLineFlags.cpp
diff --git a/tools/SkFlags.cpp b/tools/flags/SkCommandLineFlags.cpp
similarity index 96%
rename from tools/SkFlags.cpp
rename to tools/flags/SkCommandLineFlags.cpp
index 9635b82c007935c11ed25c9bf520d2102a7b1b9e..95811b906a894ba30cdd4c6bf23371eb5487ce1b 100644
--- a/tools/SkFlags.cpp
+++ b/tools/flags/SkCommandLineFlags.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkFlags.h"
+#include "SkCommandLineFlags.h"
static bool string_is_in(const char* target, const char* set[], size_t len) {
for (size_t i = 0; i < len; i++) {
@@ -79,10 +79,10 @@ bool SkFlagInfo::match(const char* string) {
return false;
}
-SkFlagInfo* SkFlags::gHead;
-SkString SkFlags::gUsage;
+SkFlagInfo* SkCommandLineFlags::gHead;
+SkString SkCommandLineFlags::gUsage;
-void SkFlags::SetUsage(const char* usage) {
+void SkCommandLineFlags::SetUsage(const char* usage) {
gUsage.set(usage);
}
@@ -139,11 +139,11 @@ static void print_help_for_flag(const SkFlagInfo* flag) {
SkDebugf("\n");
}
-void SkFlags::ParseCommandLine(int argc, char** argv) {
+void SkCommandLineFlags::Parse(int argc, char** argv) {
// Only allow calling this function once.
static bool gOnce;
if (gOnce) {
- SkDebugf("ParseCommandLine should only be called once at the beginning"
+ SkDebugf("Parse should only be called once at the beginning"
" of main!\n");
SkASSERT(false);
return;
@@ -168,7 +168,7 @@ void SkFlags::ParseCommandLine(int argc, char** argv) {
SkDebugf("%s\n%s\n", argv[0], gUsage.c_str());
}
SkDebugf("Flags:\n");
- SkFlagInfo* flag = SkFlags::gHead;
+ SkFlagInfo* flag = SkCommandLineFlags::gHead;
while (flag != NULL) {
// If no flags followed --help, print them all
bool printFlag = 0 == helpFlags.count();
« no previous file with comments | « tools/flags/SkCommandLineFlags.h ('k') | tools/render_pictures_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698