mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 07:59:00 +08:00
Enums::nullvalue_used() now requires LineInfo as first arg
This commit is contained in:
parent
8e8debc848
commit
98ea6780e7
@ -1,9 +1,10 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include "LineInfo.h"
|
||||
|
||||
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 nullvalue_used(const LineInfo& line_info, const std::string& enum_name);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
|
||||
case ONLY_RELEASE_CRT:
|
||||
return CMAKE_VARIABLE_ONLY_RELEASE_CRT;
|
||||
case NULLVALUE:
|
||||
Enums::nullvalue_used(ENUM_NAME);
|
||||
Enums::nullvalue_used(VCPKG_LINE_INFO, ENUM_NAME);
|
||||
default:
|
||||
Checks::unreachable(VCPKG_LINE_INFO);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ namespace vcpkg::Enums
|
||||
return Strings::format("%s_NULLVALUE", enum_name);
|
||||
}
|
||||
|
||||
__declspec(noreturn) void nullvalue_used(const std::string& enum_name)
|
||||
__declspec(noreturn) void nullvalue_used(const LineInfo& line_info, const std::string& enum_name)
|
||||
{
|
||||
Checks::exit_with_message("NULLVALUE of enum %s was used", enum_name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user