mirror of https://github.com/microsoft/vcpkg.git
[scnlib] support fast-float 7.0.0 (#43471)
This commit is contained in:
parent
57db540f3c
commit
2b8927fe37
|
|
@ -6,6 +6,9 @@ vcpkg_from_github(
|
|||
REF "v${VERSION}"
|
||||
SHA512 db14d71da3c1ecb849f00ac1e334f39c532592230e950aa1009ff00ba56670cb71e33ca457fd4ac66595ff43f0dca0e42d45f672848b9cde3cba80f19ef8693f
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
# support fast_float 7.0.0
|
||||
scnlib-pr-136.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
diff --git a/src/scn/impl.cpp b/src/scn/impl.cpp
|
||||
index aa0d334..ab859a4 100644
|
||||
--- a/src/scn/impl.cpp
|
||||
+++ b/src/scn/impl.cpp
|
||||
@@ -721,15 +721,17 @@ scan_expected<std::ptrdiff_t> fast_float_fallback(impl_init_data<CharT> data,
|
||||
struct fast_float_impl_base : impl_base {
|
||||
fast_float::chars_format get_flags() const
|
||||
{
|
||||
- unsigned format_flags{};
|
||||
+ fast_float::chars_format format_flags{};
|
||||
if ((m_options & float_reader_base::allow_fixed) != 0) {
|
||||
- format_flags |= fast_float::fixed;
|
||||
+ format_flags =
|
||||
+ static_cast<fast_float::chars_format>(format_flags | fast_float::chars_format::fixed);
|
||||
}
|
||||
if ((m_options & float_reader_base::allow_scientific) != 0) {
|
||||
- format_flags |= fast_float::scientific;
|
||||
+ format_flags =
|
||||
+ static_cast<fast_float::chars_format>(format_flags | fast_float::chars_format::scientific);
|
||||
}
|
||||
|
||||
- return static_cast<fast_float::chars_format>(format_flags);
|
||||
+ return format_flags;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "scnlib",
|
||||
"version": "4.0.1",
|
||||
"port-version": 1,
|
||||
"description": "scnlib is a modern C++ library for replacing scanf and std::istream",
|
||||
"homepage": "https://scnlib.dev/",
|
||||
"license": "Apache-2.0",
|
||||
|
|
|
|||
|
|
@ -8194,7 +8194,7 @@
|
|||
},
|
||||
"scnlib": {
|
||||
"baseline": "4.0.1",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"scope-guard": {
|
||||
"baseline": "1.1.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b26c97d1ad11fc4a361f470db0f66b9afccd218c",
|
||||
"version": "4.0.1",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "c4f32fa5eff83c4abe03aa721dcc57c3fd3f0a02",
|
||||
"version": "4.0.1",
|
||||
|
|
|
|||
Loading…
Reference in New Issue