diff options
author | Kitware Robot <kwrobot@kitware.com> | 2012-08-13 17:42:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-13 18:18:39 (GMT) |
commit | 7bbaa4283de26864b2e55e819db0884771585467 (patch) | |
tree | ecb748dbe41a13d8bdea77acd0049cde999d933e /Source/cmLoadCacheCommand.cxx | |
parent | be9db98946b7918f279812fd0616abb650eebed0 (diff) | |
download | CMake-7bbaa4283de26864b2e55e819db0884771585467.zip CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.gz CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.bz2 |
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/ \+$//'
Diffstat (limited to 'Source/cmLoadCacheCommand.cxx')
-rw-r--r-- | Source/cmLoadCacheCommand.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index a239e55..462e086 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -26,7 +26,7 @@ bool cmLoadCacheCommand { return this->ReadWithPrefix(args); } - + // Cache entries to be excluded from the import list. // If this set is empty, all cache entries are brought in // and they can not be overridden. @@ -97,7 +97,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> const& args) this->SetError("READ_WITH_PREFIX form must specify a prefix."); return false; } - + // Make sure the cache file exists. std::string cacheFile = args[0]+"/CMakeCache.txt"; if(!cmSystemTools::FileExists(cacheFile.c_str())) @@ -106,22 +106,22 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> const& args) this->SetError(e.c_str()); return false; } - + // Prepare the table of variables to read. this->Prefix = args[2]; for(unsigned int i=3; i < args.size(); ++i) { this->VariablesToRead.insert(args[i]); } - + // Read the cache file. - std::ifstream fin(cacheFile.c_str()); - + std::ifstream fin(cacheFile.c_str()); + // This is a big hack read loop to overcome a buggy ifstream // implementation on HP-UX. This should work on all platforms even // for small buffer sizes. const int bufferSize = 4096; - char buffer[bufferSize]; + char buffer[bufferSize]; std::string line; while(fin) { @@ -152,7 +152,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> const& args) // Completed a line. this->CheckLine(line.c_str()); line = ""; - + // Skip the newline character. ++i; } @@ -164,7 +164,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> const& args) // Partial last line. this->CheckLine(line.c_str()); } - + return true; } |