Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7173 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkTDArray.h b/include/core/SkTDArray.h
index 6f7a60e..ee77889 100644
--- a/include/core/SkTDArray.h
+++ b/include/core/SkTDArray.h
@@ -108,7 +108,7 @@
SkASSERT((unsigned)index < fCount);
return fArray[index];
}
-
+
T& getAt(int index) const {
return (*this)[index];
}
diff --git a/include/utils/SkRTConf.h b/include/utils/SkRTConf.h
index a02979f..89b8812 100644
--- a/include/utils/SkRTConf.h
+++ b/include/utils/SkRTConf.h
@@ -44,10 +44,10 @@
void set(const T& value) { fValue = value; }
protected:
void doPrint(char *s) const;
-
+
SkString fDescription;
T fDefault;
- T fValue;
+ T fValue;
};
#ifdef SK_DEVELOPER
@@ -75,10 +75,10 @@
template <typename T> void set(const char *confname, T value);
private:
template<typename T> friend class SkRTConf;
-
+
void registerConf(SkRTConfBase *conf);
template <typename T> bool parse(const char *name, T* value);
-
+
SkTDArray<SkString *> fConfigFileKeys, fConfigFileValues;
typedef SkTDict< SkTDArray<SkRTConfBase *> * > ConfMap;
ConfMap fConfs;
@@ -94,7 +94,7 @@
, fValue(defaultValue)
, fDefault(defaultValue)
, fDescription(description) {
-
+
T value;
if (skRTConfRegistry().parse(fName.c_str(), &value)) {
fValue = value;
@@ -162,7 +162,7 @@
bool SkRTConf<T>::equals(const SkRTConfBase *conf) const {
// static_cast here is okay because there's only one kind of child class.
const SkRTConf<T> *child_pointer = static_cast<const SkRTConf<T> *>(conf);
- return child_pointer &&
+ return child_pointer &&
fName == child_pointer->fName &&
fDescription == child_pointer->fDescription &&
fValue == child_pointer->fValue &&
diff --git a/src/core/SkGraphics.cpp b/src/core/SkGraphics.cpp
index d0d64de..873d546 100644
--- a/src/core/SkGraphics.cpp
+++ b/src/core/SkGraphics.cpp
@@ -59,7 +59,7 @@
SkDebugf("Non-default runtime configuration options:\n");
skRTConfRegistry().printNonDefault( );
#endif
-
+
SkFlattenable::InitializeFlattenables();
#ifdef BUILD_EMBOSS_TABLE
SkEmbossMask_BuildTable();
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 1b47202..9853af2 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -463,7 +463,7 @@
GrPrintf(shader.c_str());
GrPrintf("\n");
}
-
+
if (!(fVShaderID = compile_shader(fContextInfo, GR_GL_VERTEX_SHADER, shader))) {
return false;
}
diff --git a/src/utils/SkRTConf.cpp b/src/utils/SkRTConf.cpp
index 4e4e577..c701552 100644
--- a/src/utils/SkRTConf.cpp
+++ b/src/utils/SkRTConf.cpp
@@ -9,21 +9,21 @@
#include "SkOSFile.h"
SkRTConfRegistry::SkRTConfRegistry(): fConfs(100) {
-
+
SkFILE *fp = sk_fopen(configFileLocation(), kRead_SkFILE_Flag);
if (!fp) {
return;
}
-
+
char line[1024];
-
+
while (!sk_feof(fp)) {
-
+
if (!sk_fgets(line, sizeof(line), fp)) {
break;
}
-
+
char *commentptr = strchr(line, '#');
if (commentptr == line) {
continue;
@@ -31,9 +31,9 @@
if (NULL != commentptr) {
*commentptr = '\0';
}
-
+
char sep[] = " \t\r\n";
-
+
char *keyptr = strtok(line, sep);
if (!keyptr) {
continue;
@@ -43,7 +43,7 @@
if (!valptr) {
continue;
}
-
+
SkString* key = new SkString(keyptr);
SkString* val = new SkString(valptr);
@@ -84,16 +84,16 @@
void SkRTConfRegistry::printAll(const char *fname) const {
SkWStream *o;
-
+
if (NULL != fname) {
o = new SkFILEWStream(fname);
} else {
o = new SkDebugWStream();
}
-
+
ConfMap::Iter iter(fConfs);
SkTDArray<SkRTConfBase *> *confArray;
-
+
while (iter.next(&confArray)) {
if (confArray->getAt(0)->isDefault()) {
o->writeText("# ");
@@ -101,28 +101,28 @@
confArray->getAt(0)->print(o);
o->newline();
}
-
+
delete o;
}
void SkRTConfRegistry::printNonDefault(const char *fname) const {
SkWStream *o;
-
+
if (NULL != fname) {
o = new SkFILEWStream(fname);
} else {
o = new SkDebugWStream();
- }
+ }
ConfMap::Iter iter(fConfs);
SkTDArray<SkRTConfBase *> *confArray;
-
+
while (iter.next(&confArray)) {
if (!confArray->getAt(0)->isDefault()) {
confArray->getAt(0)->print(o);
o->newline();
}
}
-
+
delete o;
}
@@ -149,7 +149,7 @@
SkDebugf("WARNING: Invoked non-specialized doParse function...\n");
if (success) {
*success = false;
- }
+ }
return (T) 0;
}
@@ -208,15 +208,15 @@
str = fConfigFileValues[i];
}
}
-
+
SkString environment_variable("skia.");
environment_variable.append(name);
-
+
const char *environment_value = getenv(environment_variable.c_str());
if (environment_value) {
str->set(environment_value);
} else {
- // apparently my shell doesn't let me have environment variables that
+ // apparently my shell doesn't let me have environment variables that
// have periods in them, so also let the user substitute underscores.
SkString underscore_environment_variable("skia_");
char *underscore_name = SkStrDup(name);
@@ -228,11 +228,11 @@
str->set(environment_value);
}
}
-
+
if (!str) {
return false;
}
-
+
bool success;
T new_value = doParse<T>(str->c_str(),&success);
if (success) {
@@ -253,17 +253,17 @@
template bool SkRTConfRegistry::parse(const char *name, const char **value);
template <typename T> void SkRTConfRegistry::set(const char *name, T value) {
-
+
SkTDArray<SkRTConfBase *> *confArray;
if (!fConfs.find(name, &confArray)) {
SkDebugf("WARNING: Attempting to set configuration value \"%s\", but I've never heard of that.\n", name);
return;
}
-
+
for (SkRTConfBase **confBase = confArray->begin(); confBase != confArray->end(); confBase++) {
// static_cast here is okay because there's only one kind of child class.
SkRTConf<T> *concrete = static_cast<SkRTConf<T> *>(*confBase);
-
+
if (concrete) {
concrete->set(value);
}