Integrate Refactor solver sources and dual MSVC CMake builds
This commit is contained in:
+10
-2
@@ -13,6 +13,15 @@ char AsciiLower(const char value) noexcept {
|
||||
return value;
|
||||
}
|
||||
|
||||
std::string AsciiUppercase(std::string value) {
|
||||
for (char& character : value) {
|
||||
if (character >= 'a' && character <= 'z') {
|
||||
character = static_cast<char>(character - 'a' + 'A');
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
bool AsciiCaseInsensitiveEquals(const std::string_view lhs,
|
||||
const std::string_view rhs) noexcept {
|
||||
if (lhs.size() != rhs.size()) {
|
||||
@@ -35,14 +44,13 @@ Result<std::int64_t> ParsePositiveSourceLabel(const std::string_view text) {
|
||||
if (parsed.ec == std::errc{} && parsed.ptr == last && value > 0) {
|
||||
return Result<std::int64_t>::Success(value);
|
||||
}
|
||||
const std::string identity{text};
|
||||
return Result<std::int64_t>::Failure(Status::Failure(
|
||||
FailureCategory::kInput,
|
||||
{{Severity::kError,
|
||||
"invalid-source-label",
|
||||
{{}, 0U},
|
||||
"SOURCE_LABEL",
|
||||
identity,
|
||||
std::string{text},
|
||||
"A source label must be a complete positive base-10 integer."}}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user