diff options
author | Kitware Robot <kwrobot@kitware.com> | 2016-05-16 14:34:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-16 20:05:19 (GMT) |
commit | d9fd2f5402eeaa345691313658e02b51038f570b (patch) | |
tree | dca71b9a7e267f4c6300da3eb770415381726785 /Source/cmLocalXCodeGenerator.cxx | |
parent | 82df6deaafb36cbbfd450202bb20b320f637751a (diff) | |
download | CMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2 |
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Diffstat (limited to 'Source/cmLocalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmLocalXCodeGenerator.cxx | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx index 18eccdd..db87946 100644 --- a/Source/cmLocalXCodeGenerator.cxx +++ b/Source/cmLocalXCodeGenerator.cxx @@ -28,8 +28,8 @@ cmLocalXCodeGenerator::~cmLocalXCodeGenerator() { } -std::string -cmLocalXCodeGenerator::GetTargetDirectory(cmGeneratorTarget const*) const +std::string cmLocalXCodeGenerator::GetTargetDirectory( + cmGeneratorTarget const*) const { // No per-target directory for this generator (yet). return ""; @@ -48,11 +48,10 @@ void cmLocalXCodeGenerator::Generate() cmLocalGenerator::Generate(); std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets(); - for(std::vector<cmGeneratorTarget*>::iterator iter = targets.begin(); - iter != targets.end(); ++iter) - { + for (std::vector<cmGeneratorTarget*>::iterator iter = targets.begin(); + iter != targets.end(); ++iter) { (*iter)->HasMacOSXRpathInstallNameDir(""); - } + } } void cmLocalXCodeGenerator::GenerateInstallRules() @@ -60,25 +59,24 @@ void cmLocalXCodeGenerator::GenerateInstallRules() cmLocalGenerator::GenerateInstallRules(); std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets(); - for(std::vector<cmGeneratorTarget*>::iterator iter = targets.begin(); - iter != targets.end(); ++iter) - { + for (std::vector<cmGeneratorTarget*>::iterator iter = targets.begin(); + iter != targets.end(); ++iter) { (*iter)->HasMacOSXRpathInstallNameDir(""); - } + } } void cmLocalXCodeGenerator::ComputeObjectFilenames( - std::map<cmSourceFile const*, std::string>& mapping, - cmGeneratorTarget const*) + std::map<cmSourceFile const*, std::string>& mapping, + cmGeneratorTarget const*) { // Count the number of object files with each name. Warn about duplicate // names since Xcode names them uniquely automatically with a numeric suffix // to avoid exact duplicate file names. Note that Mac file names are not // typically case sensitive, hence the LowerCase. std::map<std::string, int> counts; - for(std::map<cmSourceFile const*, std::string>::iterator - si = mapping.begin(); si != mapping.end(); ++si) - { + for (std::map<cmSourceFile const*, std::string>::iterator si = + mapping.begin(); + si != mapping.end(); ++si) { cmSourceFile const* sf = si->first; std::string objectName = cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath()); @@ -86,10 +84,9 @@ void cmLocalXCodeGenerator::ComputeObjectFilenames( std::string objectNameLower = cmSystemTools::LowerCase(objectName); counts[objectNameLower] += 1; - if (2 == counts[objectNameLower]) - { + if (2 == counts[objectNameLower]) { // TODO: emit warning about duplicate name? - } - si->second = objectName; } + si->second = objectName; + } } |