From 7d26d641d3e94943b351ad55d7ffe25ec02ac791 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 14 Apr 2023 06:45:20 +1000 Subject: Miscellaneous improvements: infoxml.cpp: Thread device processing. Gives about a 10% speed improvement overall, and avoids the need to mess with the locale of the ultimate output stream. debugger/win/consolewininfo.cpp: Show image mount/create error messages on the console. emu/devdelegate.h, util/delegate.h: Added deduction guides for common delegate creation patterns (only used in sega/segas16a.cpp so far). More noexcept on things that have no business throwing exceptions. --- src/osd/modules/lib/osdlib_win32.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/osd/modules/lib/osdlib_win32.cpp') diff --git a/src/osd/modules/lib/osdlib_win32.cpp b/src/osd/modules/lib/osdlib_win32.cpp index 23e75bf9dc2..d42ad14d3df 100644 --- a/src/osd/modules/lib/osdlib_win32.cpp +++ b/src/osd/modules/lib/osdlib_win32.cpp @@ -253,7 +253,7 @@ std::error_condition osd_set_clipboard_text(std::string_view text) noexcept // osd_getpid //============================================================ -int osd_getpid() +int osd_getpid() noexcept { return GetCurrentProcessId(); } @@ -324,13 +324,13 @@ private: } // anonymous namespace -bool invalidate_instruction_cache(void const *start, std::size_t size) +bool invalidate_instruction_cache(void const *start, std::size_t size) noexcept { return FlushInstructionCache(GetCurrentProcess(), start, size) != 0; } -void *virtual_memory_allocation::do_alloc(std::initializer_list blocks, unsigned intent, std::size_t &size, std::size_t &page_size) +void *virtual_memory_allocation::do_alloc(std::initializer_list blocks, unsigned intent, std::size_t &size, std::size_t &page_size) noexcept { SYSTEM_INFO info; GetSystemInfo(&info); @@ -349,12 +349,12 @@ void *virtual_memory_allocation::do_alloc(std::initializer_list blo return result; } -void virtual_memory_allocation::do_free(void *start, std::size_t size) +void virtual_memory_allocation::do_free(void *start, std::size_t size) noexcept { VirtualFree(start, 0, MEM_RELEASE); } -bool virtual_memory_allocation::do_set_access(void *start, std::size_t size, unsigned access) +bool virtual_memory_allocation::do_set_access(void *start, std::size_t size, unsigned access) noexcept { DWORD p; if (access & EXECUTE) -- cgit v1.2.3-70-g09d2