From 1e9471a1489156720362ef12e1ec6849ea9b45b6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 27 Apr 2017 18:08:52 -0700 Subject: Run clang-format over the cpp files --- toolsrc/src/SourceParagraph.cpp | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'toolsrc/src/SourceParagraph.cpp') diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 11b83aedf..ac88e54ac 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -1,10 +1,11 @@ #include "pch.h" + #include "SourceParagraph.h" -#include "vcpkglib_helpers.h" -#include "vcpkg_System.h" -#include "vcpkg_Maps.h" #include "Triplet.h" #include "vcpkg_Checks.h" +#include "vcpkg_Maps.h" +#include "vcpkg_System.h" +#include "vcpkglib_helpers.h" namespace vcpkg { @@ -24,15 +25,12 @@ namespace vcpkg static const std::vector& get_list_of_valid_fields() { - static const std::vector valid_fields = - { - SourceParagraphRequiredField::SOURCE, - SourceParagraphRequiredField::VERSION, + static const std::vector valid_fields = { SourceParagraphRequiredField::SOURCE, + SourceParagraphRequiredField::VERSION, - SourceParagraphOptionalField::DESCRIPTION, - SourceParagraphOptionalField::MAINTAINER, - SourceParagraphOptionalField::BUILD_DEPENDS - }; + SourceParagraphOptionalField::DESCRIPTION, + SourceParagraphOptionalField::MAINTAINER, + SourceParagraphOptionalField::BUILD_DEPENDS }; return valid_fields; } @@ -57,7 +55,8 @@ namespace vcpkg const std::string remaining_fields_as_string = Strings::join("\n ", remaining_fields); const std::string valid_fields_as_string = Strings::join("\n ", valid_fields); - System::println(System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", this->name); + System::println( + System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", this->name); System::println("The following fields were not expected:\n\n %s\n\n", remaining_fields_as_string); System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", valid_fields_as_string); Checks::exit_fail(VCPKG_LINE_INFO); @@ -68,15 +67,14 @@ namespace vcpkg { auto convert = [&](const std::string& depend_string) -> Dependency { auto pos = depend_string.find(' '); - if (pos == std::string::npos) - return{ depend_string, "" }; + if (pos == std::string::npos) return { depend_string, "" }; // expect of the form "\w+ \[\w+\]" Dependency dep; dep.name = depend_string.substr(0, pos); if (depend_string.c_str()[pos + 1] != '[' || depend_string[depend_string.size() - 1] != ']') { // Error, but for now just slurp the entire string. - return{ depend_string, "" }; + return { depend_string, "" }; } dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); return dep; @@ -96,7 +94,7 @@ namespace vcpkg { if (depends_string.empty()) { - return{}; + return {}; } std::vector out; @@ -138,8 +136,5 @@ namespace vcpkg return ret; } - const std::string& to_string(const Dependency& dep) - { - return dep.name; - } + const std::string& to_string(const Dependency& dep) { return dep.name; } } -- cgit v1.2.3