mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-24 19:43:33 +01:00
Remove Enums::unreachable(). Use Checks::unreachable() instead
This commit is contained in:
parent
c55bbc3c46
commit
2590371023
@ -6,6 +6,4 @@ namespace vcpkg::Enums
|
||||
std::string nullvalue_toString(const std::string& enum_name);
|
||||
|
||||
__declspec(noreturn) void nullvalue_used(const std::string& enum_name);
|
||||
|
||||
__declspec(noreturn) void unreachable(const std::string& enum_name);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "PostBuildLint_BuildPolicies.h"
|
||||
#include "vcpkg_Enums.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
|
||||
namespace vcpkg::PostBuildLint::BuildPolicies
|
||||
{
|
||||
@ -23,7 +24,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
|
||||
case NULLVALUE:
|
||||
return NULLVALUE_STRING;
|
||||
default:
|
||||
Enums::unreachable(ENUM_NAME);
|
||||
Checks::unreachable(VCPKG_LINE_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,7 +45,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
|
||||
case NULLVALUE:
|
||||
Enums::nullvalue_used(ENUM_NAME);
|
||||
default:
|
||||
Enums::unreachable(ENUM_NAME);
|
||||
Checks::unreachable(VCPKG_LINE_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "PostBuildLint_BuildType.h"
|
||||
#include "vcpkg_Enums.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
|
||||
namespace vcpkg::PostBuildLint::BuildType
|
||||
{
|
||||
@ -26,7 +26,7 @@ namespace vcpkg::PostBuildLint::BuildType
|
||||
return RELEASE_DYNAMIC;
|
||||
}
|
||||
|
||||
Enums::unreachable(ENUM_NAME);
|
||||
Checks::unreachable(VCPKG_LINE_INFO);
|
||||
}
|
||||
|
||||
const ConfigurationType::type& type::config() const
|
||||
@ -57,7 +57,7 @@ namespace vcpkg::PostBuildLint::BuildType
|
||||
case BuildType::RELEASE_DYNAMIC:
|
||||
return REGEX_RELEASE_DYNAMIC;
|
||||
default:
|
||||
Enums::unreachable(ENUM_NAME);
|
||||
Checks::unreachable(VCPKG_LINE_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ namespace vcpkg::PostBuildLint::BuildType
|
||||
case BuildType::RELEASE_DYNAMIC:
|
||||
return NAME_RELEASE_DYNAMIC;
|
||||
default:
|
||||
Enums::unreachable(ENUM_NAME);
|
||||
Checks::unreachable(VCPKG_LINE_INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "PostBuildLint_ConfigurationType.h"
|
||||
#include "vcpkg_Enums.h"
|
||||
#include "package_spec.h"
|
||||
|
||||
namespace vcpkg::PostBuildLint::ConfigurationType
|
||||
{
|
||||
@ -20,7 +21,7 @@ namespace vcpkg::PostBuildLint::ConfigurationType
|
||||
case ConfigurationType::NULLVALUE:
|
||||
return NULLVALUE_STRING;
|
||||
default:
|
||||
Enums::unreachable(ENUM_NAME);
|
||||
Checks::unreachable(VCPKG_LINE_INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "PostBuildLint_LinkageType.h"
|
||||
#include "vcpkg_Enums.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
|
||||
namespace vcpkg::PostBuildLint::LinkageType
|
||||
{
|
||||
@ -20,7 +21,7 @@ namespace vcpkg::PostBuildLint::LinkageType
|
||||
case LinkageType::NULLVALUE:
|
||||
return NULLVALUE_STRING;
|
||||
default:
|
||||
Enums::unreachable(ENUM_NAME);
|
||||
Checks::unreachable(VCPKG_LINE_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,9 +13,4 @@ namespace vcpkg::Enums
|
||||
{
|
||||
Checks::exit_with_message("NULLVALUE of enum %s was used", enum_name);
|
||||
}
|
||||
|
||||
__declspec(noreturn) void unreachable(const std::string& enum_name)
|
||||
{
|
||||
Checks::exit_with_message("Unreachable code for enum, %s", enum_name);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user