mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:28:59 +08:00
[date] Update to HEAD versioning (#39465)
This commit is contained in:
parent
2318038614
commit
7176d94a0b
@ -1,8 +1,8 @@
|
||||
diff --git i/include/date/date.h w/include/date/date.h
|
||||
index fce6200..6a77ad4 100644
|
||||
--- i/include/date/date.h
|
||||
+++ w/include/date/date.h
|
||||
@@ -82,7 +82,7 @@
|
||||
diff --git a/include/date/date.h b/include/date/date.h
|
||||
index beb627e..ba48515 100644
|
||||
--- a/include/date/date.h
|
||||
+++ b/include/date/date.h
|
||||
@@ -81,7 +81,7 @@
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
// warning C4127: conditional expression is constant
|
||||
@ -11,3 +11,80 @@ index fce6200..6a77ad4 100644
|
||||
#endif
|
||||
|
||||
namespace date
|
||||
diff --git a/src/tz.cpp b/src/tz.cpp
|
||||
index 82e4312..9481afa 100644
|
||||
--- a/src/tz.cpp
|
||||
+++ b/src/tz.cpp
|
||||
@@ -202,35 +202,6 @@ namespace
|
||||
using co_task_mem_ptr = std::unique_ptr<wchar_t[], task_mem_deleter>;
|
||||
}
|
||||
|
||||
-static
|
||||
-std::wstring
|
||||
-convert_utf8_to_utf16(const std::string& s)
|
||||
-{
|
||||
- std::wstring out;
|
||||
- const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, NULL, 0);
|
||||
-
|
||||
- if (size == 0)
|
||||
- {
|
||||
- std::string msg = "Failed to determine required size when converting \"";
|
||||
- msg += s;
|
||||
- msg += "\" to UTF-16.";
|
||||
- throw std::runtime_error(msg);
|
||||
- }
|
||||
-
|
||||
- out.resize(size);
|
||||
- const int check = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, &out[0], size);
|
||||
-
|
||||
- if (size != check)
|
||||
- {
|
||||
- std::string msg = "Failed to convert \"";
|
||||
- msg += s;
|
||||
- msg += "\" to UTF-16.";
|
||||
- throw std::runtime_error(msg);
|
||||
- }
|
||||
-
|
||||
- return out;
|
||||
-}
|
||||
-
|
||||
// We might need to know certain locations even if not using the remote API,
|
||||
// so keep these routines out of that block for now.
|
||||
static
|
||||
@@ -268,6 +239,36 @@ get_download_folder()
|
||||
# endif // !INSTALL
|
||||
|
||||
# endif // WINRT
|
||||
+
|
||||
+static
|
||||
+std::wstring
|
||||
+convert_utf8_to_utf16(const std::string& s)
|
||||
+{
|
||||
+ std::wstring out;
|
||||
+ const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, NULL, 0);
|
||||
+
|
||||
+ if (size == 0)
|
||||
+ {
|
||||
+ std::string msg = "Failed to determine required size when converting \"";
|
||||
+ msg += s;
|
||||
+ msg += "\" to UTF-16.";
|
||||
+ throw std::runtime_error(msg);
|
||||
+ }
|
||||
+
|
||||
+ out.resize(size);
|
||||
+ const int check = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, &out[0], size);
|
||||
+
|
||||
+ if (size != check)
|
||||
+ {
|
||||
+ std::string msg = "Failed to convert \"";
|
||||
+ msg += s;
|
||||
+ msg += "\" to UTF-16.";
|
||||
+ throw std::runtime_error(msg);
|
||||
+ }
|
||||
+
|
||||
+ return out;
|
||||
+}
|
||||
+
|
||||
# else // !_WIN32
|
||||
|
||||
# if !defined(INSTALL)
|
||||
|
@ -1,40 +0,0 @@
|
||||
diff --git a/include/date/date.h b/include/date/date.h
|
||||
index 9c6f335..3967d6b 100644
|
||||
--- a/include/date/date.h
|
||||
+++ b/include/date/date.h
|
||||
@@ -6767,7 +6767,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
|
||||
CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width;
|
||||
int tH;
|
||||
int tM;
|
||||
- long double S;
|
||||
+ long double S{};
|
||||
read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2},
|
||||
CharT{':'}, rld{S, 1, w});
|
||||
checked_set(H, tH, not_a_hour, is);
|
||||
@@ -7202,7 +7202,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
|
||||
// "%I:%M:%S %p"
|
||||
using dfs = detail::decimal_format_seconds<Duration>;
|
||||
CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width;
|
||||
- long double S;
|
||||
+ long double S{};
|
||||
int tI = not_a_hour_12_value;
|
||||
int tM = not_a_minute;
|
||||
read(is, ru{tI, 1, 2}, CharT{':'}, ru{tM, 1, 2},
|
||||
@@ -7258,7 +7258,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
|
||||
{
|
||||
using dfs = detail::decimal_format_seconds<Duration>;
|
||||
CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width;
|
||||
- long double S;
|
||||
+ long double S{};
|
||||
read(is, rld{S, 1, width == -1 ? w : static_cast<unsigned>(width)});
|
||||
checked_set(s, round_i<Duration>(duration<long double>{S}),
|
||||
not_a_second, is);
|
||||
@@ -7292,7 +7292,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
|
||||
CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width;
|
||||
int tH = not_a_hour;
|
||||
int tM = not_a_minute;
|
||||
- long double S;
|
||||
+ long double S{};
|
||||
read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2},
|
||||
CharT{':'}, rld{S, 1, w});
|
||||
checked_set(H, tH, not_a_hour, is);
|
@ -8,13 +8,12 @@ endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO HowardHinnant/date
|
||||
REF "v${VERSION}"
|
||||
SHA512 6bdc7cba821d66e17a559250cc0ce0095808e9db81cec9e16eaa4c31abdfa705299c67b72016d9b06b302bc306d063e83a374eb00728071b83a5ad650d59034f
|
||||
REF 1ead6715dec030d340a316c927c877a3c4e5a00c
|
||||
SHA512 a0b5dd2d94788929a2ba98bd629d64d188ff0ae40affd9338d3d7a94c848ae4d6addc72613964e7fad7f62e4ee20b7170b2133cb39d4e018c604ba35c68d1cff
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-fix-uwp.patch
|
||||
0002-fix-cmake-install.patch
|
||||
fix-uninitialized-values.patch #Update the new version please remove this patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "date",
|
||||
"version": "3.0.1",
|
||||
"port-version": 5,
|
||||
"version-date": "2024-05-14",
|
||||
"description": "A date and time library based on the C++17 <chrono> header",
|
||||
"homepage": "https://github.com/HowardHinnant/date",
|
||||
"license": "MIT",
|
||||
|
@ -2161,8 +2161,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"date": {
|
||||
"baseline": "3.0.1",
|
||||
"port-version": 5
|
||||
"baseline": "2024-05-14",
|
||||
"port-version": 0
|
||||
},
|
||||
"datraw": {
|
||||
"baseline": "1.0.9",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "52f7b2f3a6398c0aa4a073a06c55c1a513b478bb",
|
||||
"version-date": "2024-05-14",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "cf7d19c233055e8ffa12b200af6afb894ed76447",
|
||||
"version": "3.0.1",
|
||||
|
Loading…
Reference in New Issue
Block a user