aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-03 14:48:24 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-04 16:44:41 -0700
commit7ee180ebdd7ec93a4ba3c34c38fd467109365ad6 (patch)
tree4a1cc5eec64304e59819fdd712fbbcc40d786ced /toolsrc/src
parent83cde513345f5544325520b89ec3f1f27bd8b2a6 (diff)
downloadvcpkg-7ee180ebdd7ec93a4ba3c34c38fd467109365ad6.tar.gz
vcpkg-7ee180ebdd7ec93a4ba3c34c38fd467109365ad6.zip
paragraph_parse_result -> ParagraphParseResult
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/ParagraphParseResult.cpp45
-rw-r--r--toolsrc/src/Paragraphs.cpp4
-rw-r--r--toolsrc/src/paragraph_parse_result.cpp45
3 files changed, 47 insertions, 47 deletions
diff --git a/toolsrc/src/ParagraphParseResult.cpp b/toolsrc/src/ParagraphParseResult.cpp
new file mode 100644
index 000000000..c2da78d30
--- /dev/null
+++ b/toolsrc/src/ParagraphParseResult.cpp
@@ -0,0 +1,45 @@
+#include "pch.h"
+#include "vcpkg_Checks.h"
+#include "ParagraphParseResult.h"
+
+namespace vcpkg
+{
+ const char* ParagraphParseResultCategoryImpl::name() const noexcept
+ {
+ return "ParagraphParseResult";
+ }
+
+ std::string ParagraphParseResultCategoryImpl::message(int ev) const noexcept
+ {
+ switch (static_cast<ParagraphParseResult>(ev))
+ {
+ case ParagraphParseResult::SUCCESS:
+ return "OK";
+ case ParagraphParseResult::EXPECTED_ONE_PARAGRAPH:
+ return "There should be exactly one paragraph";
+ default:
+ Checks::unreachable(VCPKG_LINE_INFO);
+ }
+ }
+
+ const std::error_category& paragraph_parse_result_category()
+ {
+ static ParagraphParseResultCategoryImpl instance;
+ return instance;
+ }
+
+ std::error_code make_error_code(ParagraphParseResult e)
+ {
+ return std::error_code(static_cast<int>(e), paragraph_parse_result_category());
+ }
+
+ ParagraphParseResult to_paragraph_parse_result(int i)
+ {
+ return static_cast<ParagraphParseResult>(i);
+ }
+
+ ParagraphParseResult to_paragraph_parse_result(std::error_code ec)
+ {
+ return to_paragraph_parse_result(ec.value());
+ }
+}
diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp
index d6784bc63..0d91e95a9 100644
--- a/toolsrc/src/Paragraphs.cpp
+++ b/toolsrc/src/Paragraphs.cpp
@@ -1,7 +1,7 @@
#include "pch.h"
#include "Paragraphs.h"
#include "vcpkg_Files.h"
-#include "paragraph_parse_result.h"
+#include "ParagraphParseResult.h"
namespace vcpkg::Paragraphs
{
@@ -203,7 +203,7 @@ namespace vcpkg::Paragraphs
return p.at(0);
}
- return std::error_code(paragraph_parse_result::EXPECTED_ONE_PARAGRAPH);
+ return std::error_code(ParagraphParseResult::EXPECTED_ONE_PARAGRAPH);
}
expected<std::vector<std::unordered_map<std::string, std::string>>> parse_paragraphs(const std::string& str)
diff --git a/toolsrc/src/paragraph_parse_result.cpp b/toolsrc/src/paragraph_parse_result.cpp
deleted file mode 100644
index 4715f7a16..000000000
--- a/toolsrc/src/paragraph_parse_result.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "pch.h"
-#include "vcpkg_Checks.h"
-#include "paragraph_parse_result.h"
-
-namespace vcpkg
-{
- const char* paragraph_parse_result_category_impl::name() const noexcept
- {
- return "paragraph_parse_result";
- }
-
- std::string paragraph_parse_result_category_impl::message(int ev) const noexcept
- {
- switch (static_cast<paragraph_parse_result>(ev))
- {
- case paragraph_parse_result::SUCCESS:
- return "OK";
- case paragraph_parse_result::EXPECTED_ONE_PARAGRAPH:
- return "There should be exactly one paragraph";
- default:
- Checks::unreachable(VCPKG_LINE_INFO);
- }
- }
-
- const std::error_category& paragraph_parse_result_category()
- {
- static paragraph_parse_result_category_impl instance;
- return instance;
- }
-
- std::error_code make_error_code(paragraph_parse_result e)
- {
- return std::error_code(static_cast<int>(e), paragraph_parse_result_category());
- }
-
- paragraph_parse_result to_paragraph_parse_result(int i)
- {
- return static_cast<paragraph_parse_result>(i);
- }
-
- paragraph_parse_result to_paragraph_parse_result(std::error_code ec)
- {
- return to_paragraph_parse_result(ec.value());
- }
-}