From 43eb772d9475b4e9ec06eb54dca078a4793ab9e4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 17 Feb 2017 20:13:36 -0800 Subject: Change Info::email() to Contact::email(). Remove vcpkg_info.h/cpp --- toolsrc/include/vcpkg_Commands.h | 1 + toolsrc/include/vcpkg_info.h | 8 -------- toolsrc/src/commands_build.cpp | 1 - toolsrc/src/commands_contact.cpp | 11 ++++++++--- toolsrc/src/commands_update.cpp | 1 - toolsrc/src/vcpkg.cpp | 3 +-- toolsrc/src/vcpkg_info.cpp | 11 ----------- toolsrc/vcpkglib/vcpkglib.vcxproj | 2 -- toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 6 ------ 9 files changed, 10 insertions(+), 34 deletions(-) delete mode 100644 toolsrc/include/vcpkg_info.h delete mode 100644 toolsrc/src/vcpkg_info.cpp diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 3c3ae03c6..544dffe72 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -127,6 +127,7 @@ namespace vcpkg::Commands namespace Contact { + const std::string& email(); void perform_and_exit(const vcpkg_cmd_arguments& args); } diff --git a/toolsrc/include/vcpkg_info.h b/toolsrc/include/vcpkg_info.h deleted file mode 100644 index ebd87fd86..000000000 --- a/toolsrc/include/vcpkg_info.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -namespace vcpkg::Info -{ - const std::string& email(); -} diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index d01d40ef4..aae30efd1 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -8,7 +8,6 @@ #include "vcpkg_System.h" #include "vcpkg_Environment.h" #include "metrics.h" -#include "vcpkg_info.h" #include "vcpkg_Enums.h" namespace vcpkg::Commands::Build diff --git a/toolsrc/src/commands_contact.cpp b/toolsrc/src/commands_contact.cpp index c5b8cab7e..29f0d4d27 100644 --- a/toolsrc/src/commands_contact.cpp +++ b/toolsrc/src/commands_contact.cpp @@ -1,16 +1,21 @@ #include "pch.h" #include "vcpkg_Commands.h" #include "vcpkg_System.h" -#include "vcpkg_info.h" namespace vcpkg::Commands::Contact { - void perform_and_exit(const vcpkg_cmd_arguments& args) + const std::string& email() + { + static const std::string s_email = R"(vcpkg@microsoft.com)"; + return s_email; + } + + void perform_and_exit(const vcpkg_cmd_arguments& args) { args.check_exact_arg_count(0); args.check_and_get_optional_command_arguments({}); - System::println("Send an email to %s with any feedback.", Info::email()); + System::println("Send an email to %s with any feedback.", email()); exit(EXIT_SUCCESS); } } diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 3ac6694b9..d4519ca14 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -4,7 +4,6 @@ #include "vcpkg_System.h" #include "vcpkg_Files.h" #include "Paragraphs.h" -#include "vcpkg_info.h" namespace vcpkg::Commands::Update { diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 16c9cb077..f40126ecf 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -12,7 +12,6 @@ #include "vcpkg_System.h" #include "vcpkg_Input.h" #include "Paragraphs.h" -#include "vcpkg_info.h" #include "vcpkg_Strings.h" using namespace vcpkg; @@ -235,7 +234,7 @@ int wmain(const int argc, const wchar_t* const* const argv) std::cerr << "vcpkg.exe has crashed.\n" << "Please send an email to:\n" - << " " << Info::email() << "\n" + << " " << Commands::Contact::email() << "\n" << "containing a brief summary of what you were trying to do and the following data blob:\n" << "\n" << "Version=" << Commands::Version::version() << "\n" diff --git a/toolsrc/src/vcpkg_info.cpp b/toolsrc/src/vcpkg_info.cpp deleted file mode 100644 index fa2077177..000000000 --- a/toolsrc/src/vcpkg_info.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "pch.h" -#include "vcpkg_info.h" - -namespace vcpkg::Info -{ - const std::string& email() - { - static const std::string s_email = R"(vcpkg@microsoft.com)"; - return s_email; - } -} diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 4c98380fa..b96dd1050 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -173,7 +173,6 @@ - @@ -234,7 +233,6 @@ - diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 70d1b58ac..aefba7a49 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -45,9 +45,6 @@ Source Files - - Source Files - Source Files @@ -206,9 +203,6 @@ Header Files - - Header Files - Header Files -- cgit v1.2.3