diff options
author | Kitware Robot <kwrobot@kitware.com> | 2018-06-01 13:53:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-06-01 13:53:42 (GMT) |
commit | d7204e649ed4ebb19bb341b4e49eb51514364922 (patch) | |
tree | d9ac3ded5ae6899be7188795011743fe3e6da0a6 /Source/cmFileCommand.cxx | |
parent | 12fed3edb107c949671043196fa94c542b45452a (diff) | |
download | CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.zip CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.gz CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.bz2 |
Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 6.0.
* 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/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 1e47687..aae70b1 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -36,17 +36,17 @@ #include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) -#include "cmCurl.h" -#include "cmFileLockResult.h" -#include "cm_curl.h" +# include "cmCurl.h" +# include "cmFileLockResult.h" +# include "cm_curl.h" #endif #if defined(CMAKE_USE_ELF_PARSER) -#include "cmELF.h" +# include "cmELF.h" #endif #if defined(_WIN32) -#include <windows.h> +# include <windows.h> #endif class cmSystemToolsFileTime; @@ -216,7 +216,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args, #else mode | S_IWUSR | S_IWGRP #endif - ); + ); } // If GetPermissions fails, pretend like it is ok. File open will fail if // the file is not writable @@ -282,7 +282,8 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args) // Open the specified file. #if defined(_WIN32) || defined(__CYGWIN__) cmsys::ifstream file( - fileName.c_str(), std::ios::in | + fileName.c_str(), + std::ios::in | (hexOutputArg.IsEnabled() ? std::ios::binary : std::ios::in)); #else cmsys::ifstream file(fileName.c_str()); @@ -327,8 +328,9 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args) } else { std::string line; bool has_newline = false; - while (sizeLimit != 0 && cmSystemTools::GetLineFromStream( - file, line, &has_newline, sizeLimit)) { + while ( + sizeLimit != 0 && + cmSystemTools::GetLineFromStream(file, line, &has_newline, sizeLimit)) { if (sizeLimit > 0) { sizeLimit = sizeLimit - static_cast<long>(line.size()); if (has_newline) { @@ -616,7 +618,9 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args) } else if (encoding == encoding_utf8) { // Check for UTF-8 encoded string (up to 4 octets) static const unsigned char utf8_check_table[3][2] = { - { 0xE0, 0xC0 }, { 0xF0, 0xE0 }, { 0xF8, 0xF0 }, + { 0xE0, 0xC0 }, + { 0xF0, 0xE0 }, + { 0xF8, 0xF0 }, }; // how many octets are there? @@ -865,8 +869,9 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args, globMessage.content); } else { this->Makefile->IssueMessage( - cmake::FATAL_ERROR, "Error has occurred while globbing for '" + - *i + "' - " + globMessage.content); + cmake::FATAL_ERROR, + "Error has occurred while globbing for '" + *i + "' - " + + globMessage.content); shouldExit = true; } } @@ -2866,9 +2871,9 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args) return false; } -#if defined(_WIN32) +# if defined(_WIN32) url = fix_file_url_windows(url); -#endif +# endif ::CURL* curl; ::curl_global_init(CURL_GLOBAL_DEFAULT); @@ -3155,9 +3160,9 @@ bool cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args) unsigned long file_size = cmsys::SystemTools::FileLength(filename); -#if defined(_WIN32) +# if defined(_WIN32) url = fix_file_url_windows(url); -#endif +# endif ::CURL* curl; ::curl_global_init(CURL_GLOBAL_DEFAULT); |