This commit is contained in:
		| @@ -53,10 +53,6 @@ | ||||
| #include <csignal> | ||||
| #endif // defined(__APPLE__) | ||||
|  | ||||
| #if defined(_WIN32) | ||||
| #include "utils/com_init_wrapper.hpp" | ||||
| #endif // defined(_WIN32) | ||||
|  | ||||
| namespace { | ||||
| #if defined(PROJECT_ENABLE_CURL) | ||||
| bool curl_initialized{false}; | ||||
| @@ -79,10 +75,6 @@ auto project_initialize() -> bool { | ||||
|   std::signal(SIGPIPE, SIG_IGN); | ||||
| #endif // defined(__APPLE__) | ||||
|  | ||||
| #if defined(_WIN32) | ||||
|   [[maybe_unused]] static const utils::com_init_wrapper wrapper; | ||||
| #endif // defined(_WIN32) | ||||
|  | ||||
| #if defined(PROJECT_REQUIRE_ALPINE) && !defined(PROJECT_IS_MINGW) | ||||
|   { | ||||
|     static constexpr auto guard_size{4096U}; | ||||
|   | ||||
| @@ -173,7 +173,7 @@ auto directory::create_directory(std::string_view path) const | ||||
|     } | ||||
|  | ||||
| #if defined(_WIN32) | ||||
|     [[maybe_unused]] static const utils::com_init_wrapper wrapper; | ||||
|     [[maybe_unused]] thread_local const utils::com_init_wrapper wrapper; | ||||
|  | ||||
|     auto res = ::SHCreateDirectory(nullptr, | ||||
|                                    utils::string::from_utf8(abs_path).c_str()); | ||||
|   | ||||
| @@ -66,7 +66,7 @@ auto get_last_error_code() -> DWORD { return ::GetLastError(); } | ||||
| auto get_local_app_data_directory() -> const std::string & { | ||||
|   REPERTORY_USES_FUNCTION_NAME(); | ||||
|  | ||||
|   [[maybe_unused]] static const utils::com_init_wrapper wrapper; | ||||
|   [[maybe_unused]] thread_local const utils::com_init_wrapper wrapper; | ||||
|  | ||||
|   static std::string app_data = ([]() -> std::string { | ||||
|     PWSTR local_app_data{}; | ||||
| @@ -145,7 +145,7 @@ auto run_process_elevated(std::vector<const char *> args) -> int { | ||||
| void set_last_error_code(DWORD error_code) { ::SetLastError(error_code); } | ||||
|  | ||||
| auto get_startup_folder() -> std::wstring { | ||||
|   [[maybe_unused]] static const utils::com_init_wrapper wrapper; | ||||
|   [[maybe_unused]] thread_local const utils::com_init_wrapper wrapper; | ||||
|  | ||||
|   PWSTR raw{nullptr}; | ||||
|   auto result = ::SHGetKnownFolderPath(FOLDERID_Startup, 0, nullptr, &raw); | ||||
| @@ -165,7 +165,7 @@ auto get_startup_folder() -> std::wstring { | ||||
| auto create_shortcut(const shortcut_cfg &cfg, bool overwrite_existing) -> bool { | ||||
|   REPERTORY_USES_FUNCTION_NAME(); | ||||
|  | ||||
|   [[maybe_unused]] static const utils::com_init_wrapper wrapper; | ||||
|   [[maybe_unused]] thread_local const utils::com_init_wrapper wrapper; | ||||
|  | ||||
|   const auto hr_hex = [](HRESULT result) -> std::string { | ||||
|     std::ostringstream oss; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user