Remove trailing whitespace from most CMake and C/C++ code

Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
This commit is contained in:
Kitware Robot
2012-08-13 13:42:58 -04:00
committed by Brad King
parent be9db98946
commit 7bbaa4283d
614 changed files with 3951 additions and 3951 deletions
+18 -18
View File
@@ -22,7 +22,7 @@ class cmake;
* \brief Control class for cmake's cache
*
* Load and Save CMake cache files.
*
*
*/
class cmCacheManager
{
@@ -30,7 +30,7 @@ public:
cmCacheManager(cmake* cm);
class CacheIterator;
friend class cmCacheManager::CacheIterator;
enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL,STATIC,
enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL,STATIC,
UNINITIALIZED };
private:
@@ -57,7 +57,7 @@ public:
bool IsAtEnd() const;
void Next();
const char *GetName() const {
return this->Position->first.c_str(); }
return this->Position->first.c_str(); }
const char* GetProperty(const char*) const ;
bool GetPropertyAsBool(const char*) const ;
bool PropertyExists(const char*) const;
@@ -76,7 +76,7 @@ public:
CacheIterator(cmCacheManager &cm) : Container(cm) {
this->Begin();
}
CacheIterator(cmCacheManager &cm, const char* key) : Container(cm)
CacheIterator(cmCacheManager &cm, const char* key) : Container(cm)
{
if ( key )
{
@@ -87,30 +87,30 @@ public:
CacheEntry const& GetEntry() const { return this->Position->second; }
CacheEntry& GetEntry() { return this->Position->second; }
};
///! return an iterator to iterate through the cache map
cmCacheManager::CacheIterator NewIterator()
cmCacheManager::CacheIterator NewIterator()
{
return CacheIterator(*this);
}
}
/**
* Types for the cache entries. These are useful as
* hints for a cache editor program. Path should bring
* up a file chooser, BOOL a check box, and STRING a
* up a file chooser, BOOL a check box, and STRING a
* text entry box, FILEPATH is a full path to a file which
* can be different than just a path input
*/
static CacheEntryType StringToType(const char*);
static const char* TypeToString(CacheEntryType);
static bool IsType(const char*);
///! Load a cache for given makefile. Loads from ouput home.
bool LoadCache(cmMakefile*);
bool LoadCache(cmMakefile*);
///! Load a cache for given makefile. Loads from path/CMakeCache.txt.
bool LoadCache(const char* path);
bool LoadCache(const char* path, bool internal);
bool LoadCache(const char* path, bool internal,
bool LoadCache(const char* path, bool internal,
std::set<cmStdString>& excludes,
std::set<cmStdString>& includes);
@@ -124,19 +124,19 @@ public:
///! Print the cache to a stream
void PrintCache(std::ostream&) const;
///! Get the iterator for an entry with a given key.
cmCacheManager::CacheIterator GetCacheIterator(const char *key=0);
///! Remove an entry from the cache
void RemoveCacheEntry(const char* key);
///! Get the number of entries in the cache
int GetSize() {
return static_cast<int>(this->Cache.size()); }
///! Break up a line like VAR:type="value" into var, type and value
static bool ParseEntry(const char* entry,
static bool ParseEntry(const char* entry,
std::string& var,
std::string& value,
CacheEntryType& type);
@@ -154,7 +154,7 @@ public:
protected:
///! Add an entry into the cache
void AddCacheEntry(const char* key, const char* value,
void AddCacheEntry(const char* key, const char* value,
const char* helpString, CacheEntryType type);
///! Get a cache entry object for a key