From 002fd888ef16b6a74a86ddc42e062e2ff8228303 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 10 Jan 2025 22:01:24 +0300 Subject: [PATCH] Fix conversion warning --- include/boost/dll/detail/windows/path_from_handle.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/dll/detail/windows/path_from_handle.hpp b/include/boost/dll/detail/windows/path_from_handle.hpp index cae3ab15..9e4cccb3 100644 --- a/include/boost/dll/detail/windows/path_from_handle.hpp +++ b/include/boost/dll/detail/windows/path_from_handle.hpp @@ -51,7 +51,7 @@ namespace boost { namespace dll { namespace detail { ec = boost::dll::detail::last_error_code(); for (boost::winapi::DWORD_ new_size = 1024; new_size < 1024 * 1024 && static_cast(ec.value()) == ERROR_INSUFFICIENT_BUFFER_; new_size *= 2) { std::wstring p(new_size, L'\0'); - const std::size_t size = boost::winapi::GetModuleFileNameW(handle, &p[0], p.size()); + const std::size_t size = boost::winapi::GetModuleFileNameW(handle, &p[0], static_cast(p.size())); if (size != 0 && size < p.size()) { // On success, GetModuleFileNameW() doesn't reset last error to ERROR_SUCCESS. Resetting it manually. ec.clear();