clang-format: Increase column limit from 80 to 120
This commit is contained in:
parent
109f64c446
commit
a1fbf1015f
736 changed files with 22684 additions and 45435 deletions
|
|
@ -8,18 +8,14 @@ extern "C" EXPORT void winrt_uninitialize()
|
|||
winrt::uninit_apartment();
|
||||
}
|
||||
|
||||
static winrt::Windows::System::DispatcherQueueController
|
||||
CreateDispatcherQueueController()
|
||||
static winrt::Windows::System::DispatcherQueueController CreateDispatcherQueueController()
|
||||
{
|
||||
DispatcherQueueOptions options{sizeof(DispatcherQueueOptions),
|
||||
DQTYPE_THREAD_CURRENT, DQTAT_COM_STA};
|
||||
DispatcherQueueOptions options{sizeof(DispatcherQueueOptions), DQTYPE_THREAD_CURRENT, DQTAT_COM_STA};
|
||||
|
||||
winrt::Windows::System::DispatcherQueueController controller{nullptr};
|
||||
winrt::check_hresult(CreateDispatcherQueueController(
|
||||
options,
|
||||
reinterpret_cast<
|
||||
ABI::Windows::System::IDispatcherQueueController **>(
|
||||
winrt::put_abi(controller))));
|
||||
reinterpret_cast<ABI::Windows::System::IDispatcherQueueController **>(winrt::put_abi(controller))));
|
||||
return controller;
|
||||
}
|
||||
|
||||
|
|
@ -31,36 +27,30 @@ extern "C" EXPORT struct winrt_disaptcher *winrt_dispatcher_init()
|
|||
{
|
||||
struct winrt_disaptcher *dispatcher = NULL;
|
||||
try {
|
||||
if (winrt::Windows::Foundation::Metadata::ApiInformation::
|
||||
IsApiContractPresent(
|
||||
L"Windows.Foundation.UniversalApiContract",
|
||||
5)) {
|
||||
winrt::Windows::System::DispatcherQueueController
|
||||
controller = CreateDispatcherQueueController();
|
||||
if (winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(
|
||||
L"Windows.Foundation.UniversalApiContract", 5)) {
|
||||
winrt::Windows::System::DispatcherQueueController controller =
|
||||
CreateDispatcherQueueController();
|
||||
|
||||
dispatcher = new struct winrt_disaptcher;
|
||||
dispatcher->controller = std::move(controller);
|
||||
}
|
||||
} catch (const winrt::hresult_error &err) {
|
||||
blog(LOG_ERROR, "winrt_dispatcher_init (0x%08X): %s",
|
||||
(int32_t)err.code(),
|
||||
blog(LOG_ERROR, "winrt_dispatcher_init (0x%08X): %s", (int32_t)err.code(),
|
||||
winrt::to_string(err.message()).c_str());
|
||||
} catch (...) {
|
||||
blog(LOG_ERROR, "winrt_dispatcher_init (0x%08X)",
|
||||
(int32_t)winrt::to_hresult());
|
||||
blog(LOG_ERROR, "winrt_dispatcher_init (0x%08X)", (int32_t)winrt::to_hresult());
|
||||
}
|
||||
|
||||
return dispatcher;
|
||||
}
|
||||
|
||||
extern "C" EXPORT void
|
||||
winrt_dispatcher_free(struct winrt_disaptcher *dispatcher)
|
||||
extern "C" EXPORT void winrt_dispatcher_free(struct winrt_disaptcher *dispatcher)
|
||||
try {
|
||||
delete dispatcher;
|
||||
} catch (const winrt::hresult_error &err) {
|
||||
blog(LOG_ERROR, "winrt_dispatcher_free (0x%08X): %s",
|
||||
(int32_t)err.code(), winrt::to_string(err.message()).c_str());
|
||||
blog(LOG_ERROR, "winrt_dispatcher_free (0x%08X): %s", (int32_t)err.code(),
|
||||
winrt::to_string(err.message()).c_str());
|
||||
} catch (...) {
|
||||
blog(LOG_ERROR, "winrt_dispatcher_free (0x%08X)",
|
||||
(int32_t)winrt::to_hresult());
|
||||
blog(LOG_ERROR, "winrt_dispatcher_free (0x%08X)", (int32_t)winrt::to_hresult());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue