diff --git a/src/alloy/frontend/ppc/ppc_scanner.cc b/src/alloy/frontend/ppc/ppc_scanner.cc index f23d10623..e27827792 100644 --- a/src/alloy/frontend/ppc/ppc_scanner.cc +++ b/src/alloy/frontend/ppc/ppc_scanner.cc @@ -9,6 +9,7 @@ #include +#include #include #include @@ -49,10 +50,10 @@ int PPCScanner::FindExtents(FunctionInfo* symbol_info) { XELOGSDB("Analyzing function %.8X...", symbol_info->address()); - uint64_t start_address = symbol_info->address(); - uint64_t end_address = symbol_info->end_address(); - uint64_t address = start_address; - uint64_t furthest_target = start_address; + uint32_t start_address = symbol_info->address(); + uint32_t end_address = symbol_info->end_address(); + uint32_t address = start_address; + uint32_t furthest_target = start_address; size_t blocks_found = 0; bool in_block = false; bool starts_with_mfspr_lr = false; @@ -191,7 +192,7 @@ int PPCScanner::FindExtents(FunctionInfo* symbol_info) { */ if (!ends_fn && !IsRestGprLr(target)) { - furthest_target = MAX(furthest_target, target); + furthest_target = std::max(furthest_target, target); // TODO(benvanik): perhaps queue up for a speculative check? I think // we are running over tail-call functions here that branch to @@ -217,7 +218,7 @@ int PPCScanner::FindExtents(FunctionInfo* symbol_info) { // TODO(benvanik): GetOrInsertFunction? it's likely a BB if (!IsRestGprLr(target)) { - furthest_target = MAX(furthest_target, target); + furthest_target = std::max(furthest_target, target); } } ends_block = true; diff --git a/src/alloy/string_buffer.cc b/src/alloy/string_buffer.cc index f461c92c3..aa9a0897e 100644 --- a/src/alloy/string_buffer.cc +++ b/src/alloy/string_buffer.cc @@ -14,7 +14,7 @@ namespace alloy { StringBuffer::StringBuffer(size_t initial_capacity) { - buffer_.reserve(MAX(initial_capacity, 1024)); + buffer_.reserve(std::max(initial_capacity, 1024ull)); } StringBuffer::~StringBuffer() = default; diff --git a/src/xenia/core/pal_win.cc b/src/xenia/core/pal_win.cc index 5f6498e5b..c0b0a90a3 100644 --- a/src/xenia/core/pal_win.cc +++ b/src/xenia/core/pal_win.cc @@ -9,6 +9,7 @@ #include +#include namespace { typedef struct xe_pal_win { @@ -38,7 +39,7 @@ int xe_pal_init(xe_pal_options_t options) { // Setup COM on the main thread. // NOTE: this may fail if COM has already been initialized - that's OK. - XEIGNORE(CoInitializeEx(NULL, COINIT_MULTITHREADED)); + CoInitializeEx(NULL, COINIT_MULTITHREADED); atexit(xe_pal_dealloc); return 0; @@ -114,9 +115,9 @@ int xe_pal_get_system_info(xe_system_info* out_info) { } out_info->processors.physical_count = - MAX(1, out_info->processors.physical_count); + std::max(1u, out_info->processors.physical_count); out_info->processors.logical_count = - MAX(1, out_info->processors.logical_count); + std::max(1u, out_info->processors.logical_count); result_code = 0; XECLEANUP: diff --git a/src/xenia/core/socket_win.cc b/src/xenia/core/socket_win.cc index 1f2eba015..0adc79f9e 100644 --- a/src/xenia/core/socket_win.cc +++ b/src/xenia/core/socket_win.cc @@ -264,7 +264,7 @@ int xe_socket_loop_poll(xe_socket_loop_t* loop, loop->pending_queued_write = loop->events[1].revents != 0; if (loop->pending_queued_write) { char dummy; - XEIGNORE(recv(loop->notify_rd_id, &dummy, 1, 0)); + recv(loop->notify_rd_id, &dummy, 1, 0); } loop->events[1].revents = 0; loop->events[1].events = POLLIN; diff --git a/src/xenia/cpu/xenon_memory.cc b/src/xenia/cpu/xenon_memory.cc index f7f2fdbfa..eaff6bc95 100644 --- a/src/xenia/cpu/xenon_memory.cc +++ b/src/xenia/cpu/xenon_memory.cc @@ -9,6 +9,7 @@ #include +#include #include #include @@ -482,7 +483,7 @@ XenonMemoryHeap::~XenonMemoryHeap() { } if (ptr_) { - XEIGNORE(VirtualFree(ptr_, 0, MEM_RELEASE)); + VirtualFree(ptr_, 0, MEM_RELEASE); } } @@ -508,13 +509,11 @@ uint64_t XenonMemoryHeap::Alloc( size_t alloc_size = size; size_t heap_guard_size = FLAGS_heap_guard_pages * 4096; if (heap_guard_size) { - alignment = (uint32_t)MAX(alignment, heap_guard_size); + alignment = std::max(alignment, static_cast(heap_guard_size)); alloc_size = (uint32_t)XEROUNDUP(size, heap_guard_size); } - uint8_t* p = (uint8_t*)mspace_memalign( - space_, - alignment, - alloc_size + heap_guard_size * 2); + uint8_t* p = (uint8_t*)mspace_memalign(space_, alignment, + alloc_size + heap_guard_size * 2); assert_true(reinterpret_cast(p) <= 0xFFFFFFFFFull); if (FLAGS_heap_guard_pages) { size_t real_size = mspace_usable_size(p); diff --git a/src/xenia/cpu/xex_module.cc b/src/xenia/cpu/xex_module.cc index 61796c952..d2c0b0957 100644 --- a/src/xenia/cpu/xex_module.cc +++ b/src/xenia/cpu/xex_module.cc @@ -9,6 +9,8 @@ #include +#include + #include #include #include @@ -54,8 +56,10 @@ int XexModule::Load(const std::string& name, const std::string& path, xe_xex2_re const size_t end_address = start_address + (section->info.page_count * xe_xex2_section_length); if (section->info.type == XEX_SECTION_CODE) { - low_address_ = (uint32_t)MIN(low_address_, start_address); - high_address_ = (uint32_t)MAX(high_address_, end_address); + low_address_ = + static_cast(std::min(low_address_, start_address)); + high_address_ = + static_cast(std::max(high_address_, end_address)); } i += section->info.page_count; } diff --git a/src/xenia/export_resolver.cc b/src/xenia/export_resolver.cc index 19a29cce1..ae7204f80 100644 --- a/src/xenia/export_resolver.cc +++ b/src/xenia/export_resolver.cc @@ -22,7 +22,7 @@ ExportResolver::~ExportResolver() { void ExportResolver::RegisterTable( const char* library_name, KernelExport* exports, const size_t count) { ExportTable table; - XEIGNORE(xestrcpya(table.name, XECOUNT(table.name), library_name)); + xestrcpya(table.name, XECOUNT(table.name), library_name); table.exports = exports; table.count = count; tables_.push_back(table); diff --git a/src/xenia/gpu/command_processor.cc b/src/xenia/gpu/command_processor.cc index 081b315a7..8e891f3ca 100644 --- a/src/xenia/gpu/command_processor.cc +++ b/src/xenia/gpu/command_processor.cc @@ -9,6 +9,8 @@ #include +#include + #include #include #include @@ -79,8 +81,9 @@ void CommandProcessor::EnableReadPointerWriteBack(uint32_t ptr, } void CommandProcessor::UpdateWritePointer(uint32_t value) { - write_ptr_max_index_ = MAX(write_ptr_max_index_, value); - write_ptr_index_ = value; + write_ptr_max_index_ = + std::max(static_cast(write_ptr_max_index_), value); + write_ptr_index_ = value; SetEvent(write_ptr_index_event_); } diff --git a/src/xenia/gpu/d3d11/d3d11_profiler_display.cc b/src/xenia/gpu/d3d11/d3d11_profiler_display.cc index bf9774730..3fed309e0 100644 --- a/src/xenia/gpu/d3d11/d3d11_profiler_display.cc +++ b/src/xenia/gpu/d3d11/d3d11_profiler_display.cc @@ -9,6 +9,8 @@ #include +#include + #include #include @@ -548,8 +550,8 @@ void D3D11ProfilerDisplay::DrawBox( uint32_t r = 0xFF & (color >> 16); uint32_t g = 0xFF & (color >> 8); uint32_t b = 0xFF & color; - uint32_t max_c = MAX(MAX(MAX(r, g), b), 30u); - uint32_t min_c = MIN(MIN(MIN(r, g), b), 180u); + uint32_t max_c = std::max(std::max(std::max(r, g), b), 30u); + uint32_t min_c = std::min(std::min(std::min(r, g), b), 180u); uint32_t r0 = 0xFF & ((r + max_c)/2); uint32_t g0 = 0xFF & ((g + max_c)/2); uint32_t b0 = 0xFF & ((b + max_c)/2); diff --git a/src/xenia/gpu/d3d11/d3d11_shader_translator.cc b/src/xenia/gpu/d3d11/d3d11_shader_translator.cc index 1d7c74940..92a3d856d 100644 --- a/src/xenia/gpu/d3d11/d3d11_shader_translator.cc +++ b/src/xenia/gpu/d3d11/d3d11_shader_translator.cc @@ -9,6 +9,8 @@ #include +#include + #include #include #include @@ -282,7 +284,7 @@ int D3D11ShaderTranslator::TranslatePixelShader( // Add temporary registers. uint32_t temp_regs = program_cntl.vs_regs + program_cntl.ps_regs; - for (uint32_t n = 0; n <= MAX(15, temp_regs); n++) { + for (uint32_t n = 0; n <= std::max(15u, temp_regs); n++) { append( " float4 r%d = c[%d];\n", n, n + 256); } diff --git a/src/xenia/kernel/fs/devices/disc_image_device.cc b/src/xenia/kernel/fs/devices/disc_image_device.cc index 584fe6e21..e7bfda041 100644 --- a/src/xenia/kernel/fs/devices/disc_image_device.cc +++ b/src/xenia/kernel/fs/devices/disc_image_device.cc @@ -57,12 +57,12 @@ Entry* DiscImageDevice::ResolvePath(const char* path) { // Walk the path, one separator at a time. // We copy it into the buffer and shift it left over and over. char remaining[poly::max_path]; - XEIGNORE(xestrcpya(remaining, XECOUNT(remaining), path)); + xestrcpya(remaining, XECOUNT(remaining), path); while (remaining[0]) { char* next_slash = strchr(remaining, '\\'); if (next_slash == remaining) { // Leading slash - shift - XEIGNORE(xestrcpya(remaining, XECOUNT(remaining), remaining + 1)); + xestrcpya(remaining, XECOUNT(remaining), remaining + 1); continue; } @@ -82,7 +82,7 @@ Entry* DiscImageDevice::ResolvePath(const char* path) { if (!next_slash) { break; } - XEIGNORE(xestrcpya(remaining, XECOUNT(remaining), next_slash + 1)); + xestrcpya(remaining, XECOUNT(remaining), next_slash + 1); } Entry::Type type = gdfx_entry->attributes & X_FILE_ATTRIBUTE_DIRECTORY ? diff --git a/src/xenia/kernel/fs/devices/disc_image_entry.cc b/src/xenia/kernel/fs/devices/disc_image_entry.cc index 4bde7943f..8b4886975 100644 --- a/src/xenia/kernel/fs/devices/disc_image_entry.cc +++ b/src/xenia/kernel/fs/devices/disc_image_entry.cc @@ -9,6 +9,8 @@ #include +#include + #include #include @@ -118,7 +120,7 @@ MemoryMapping* DiscImageEntry::CreateMemoryMapping( size_t real_offset = gdfx_entry_->offset + offset; size_t real_length = length ? - MIN(length, gdfx_entry_->size) : gdfx_entry_->size; + std::min(length, gdfx_entry_->size) : gdfx_entry_->size; return new DiscImageMemoryMapping( xe_mmap_get_addr(mmap_) + real_offset, real_length, diff --git a/src/xenia/kernel/fs/devices/disc_image_file.cc b/src/xenia/kernel/fs/devices/disc_image_file.cc index 3f78efd5b..c0f0d114a 100644 --- a/src/xenia/kernel/fs/devices/disc_image_file.cc +++ b/src/xenia/kernel/fs/devices/disc_image_file.cc @@ -9,10 +9,11 @@ #include -#include -#include +#include #include +#include +#include using namespace xe; using namespace xe::kernel; @@ -67,7 +68,7 @@ X_STATUS DiscImageFile::ReadSync( return X_STATUS_END_OF_FILE; } size_t real_offset = gdfx_entry->offset + byte_offset; - size_t real_length = MIN(buffer_length, gdfx_entry->size - byte_offset); + size_t real_length = std::min(buffer_length, gdfx_entry->size - byte_offset); xe_copy_memory( buffer, buffer_length, xe_mmap_get_addr(mmap) + real_offset, real_length); diff --git a/src/xenia/kernel/fs/devices/stfs_container_device.cc b/src/xenia/kernel/fs/devices/stfs_container_device.cc index dd35202dc..a0f176df2 100644 --- a/src/xenia/kernel/fs/devices/stfs_container_device.cc +++ b/src/xenia/kernel/fs/devices/stfs_container_device.cc @@ -57,12 +57,12 @@ Entry* STFSContainerDevice::ResolvePath(const char* path) { // Walk the path, one separator at a time. // We copy it into the buffer and shift it left over and over. char remaining[poly::max_path]; - XEIGNORE(xestrcpya(remaining, XECOUNT(remaining), path)); + xestrcpya(remaining, XECOUNT(remaining), path); while (remaining[0]) { char* next_slash = strchr(remaining, '\\'); if (next_slash == remaining) { // Leading slash - shift - XEIGNORE(xestrcpya(remaining, XECOUNT(remaining), remaining + 1)); + xestrcpya(remaining, XECOUNT(remaining), remaining + 1); continue; } @@ -82,7 +82,7 @@ Entry* STFSContainerDevice::ResolvePath(const char* path) { if (!next_slash) { break; } - XEIGNORE(xestrcpya(remaining, XECOUNT(remaining), next_slash + 1)); + xestrcpya(remaining, XECOUNT(remaining), next_slash + 1); } Entry::Type type = stfs_entry->attributes & X_FILE_ATTRIBUTE_DIRECTORY ? diff --git a/src/xenia/kernel/fs/devices/stfs_container_file.cc b/src/xenia/kernel/fs/devices/stfs_container_file.cc index fbba72a99..2c2a74675 100644 --- a/src/xenia/kernel/fs/devices/stfs_container_file.cc +++ b/src/xenia/kernel/fs/devices/stfs_container_file.cc @@ -9,10 +9,11 @@ #include -#include -#include +#include #include +#include +#include using namespace xe; using namespace xe::kernel; @@ -71,20 +72,20 @@ X_STATUS STFSContainerFile::ReadSync( // Each block is 4096. // Blocks may not be sequential, so we need to read by blocks and handle the // offsets. - size_t real_length = MIN(buffer_length, stfs_entry->size - byte_offset); + size_t real_length = std::min(buffer_length, stfs_entry->size - byte_offset); size_t start_block = byte_offset / 4096; - size_t end_block = MIN( - stfs_entry->block_list.size(), - (size_t)ceil((byte_offset + real_length) / 4096.0)); + size_t end_block = + std::min(stfs_entry->block_list.size(), + (size_t)ceil((byte_offset + real_length) / 4096.0)); uint8_t* dest_ptr = (uint8_t*)buffer; size_t remaining_length = real_length; for (size_t n = start_block; n < end_block; n++) { auto& record = stfs_entry->block_list[n]; size_t offset = record.offset; - size_t read_length = MIN(remaining_length, record.length); + size_t read_length = std::min(remaining_length, record.length); if (n == start_block) { offset += byte_offset % 4096; - read_length = MIN(read_length, record.length - (byte_offset % 4096)); + read_length = std::min(read_length, record.length - (byte_offset % 4096)); } xe_copy_struct(dest_ptr, map_ptr + offset, read_length); dest_ptr += read_length; diff --git a/src/xenia/kernel/fs/stfs.cc b/src/xenia/kernel/fs/stfs.cc index b3e4a8788..a72c6e57b 100644 --- a/src/xenia/kernel/fs/stfs.cc +++ b/src/xenia/kernel/fs/stfs.cc @@ -11,6 +11,7 @@ #include +#include using namespace xe; using namespace xe::kernel; @@ -257,7 +258,7 @@ STFS::Error STFS::ReadAllEntries(const uint8_t* map_ptr) { while (remaining_size && block_index && info >= 0x80) { - size_t block_size = MIN(0x1000, remaining_size); + size_t block_size = std::min(0x1000ull, remaining_size); size_t offset = BlockToOffset(ComputeBlockNumber(block_index)); entry->block_list.push_back({ offset, block_size }); remaining_size -= block_size; diff --git a/src/xenia/kernel/object_table.cc b/src/xenia/kernel/object_table.cc index b6199db69..afdca7994 100644 --- a/src/xenia/kernel/object_table.cc +++ b/src/xenia/kernel/object_table.cc @@ -9,6 +9,8 @@ #include +#include + #include #include @@ -61,10 +63,9 @@ X_STATUS ObjectTable::FindFreeSlot(uint32_t* out_slot) { } // Table out of slots, expand. - uint32_t new_table_capacity = MAX(16 * 1024, table_capacity_ * 2); + uint32_t new_table_capacity = std::max(16 * 1024u, table_capacity_ * 2); ObjectTableEntry* new_table = (ObjectTableEntry*)xe_recalloc( - table_, - table_capacity_ * sizeof(ObjectTableEntry), + table_, table_capacity_ * sizeof(ObjectTableEntry), new_table_capacity * sizeof(ObjectTableEntry)); if (!new_table) { return X_STATUS_NO_MEMORY; diff --git a/src/xenia/kernel/util/xex2.cc b/src/xenia/kernel/util/xex2.cc index 93ec53ca2..9ce9ddb86 100644 --- a/src/xenia/kernel/util/xex2.cc +++ b/src/xenia/kernel/util/xex2.cc @@ -9,6 +9,7 @@ #include +#include #include #include @@ -262,8 +263,8 @@ int xe_xex2_read_header(const uint8_t *addr, const size_t length, for (size_t i = 0, j = 0; i < string_table_size;) { assert_true(j <= 0xFF); if (j == name_index) { - XEIGNORE(xestrcpya(library->name, XECOUNT(library->name), - string_table + i)); + xestrcpya(library->name, XECOUNT(library->name), + string_table + i); break; } if (string_table[i] == 0) { @@ -481,7 +482,7 @@ void mspack_memory_close(mspack_memory_file *file) { int mspack_memory_read(struct mspack_file *file, void *buffer, int chars) { mspack_memory_file *memfile = (mspack_memory_file*)file; const off_t remaining = memfile->buffer_size - memfile->offset; - const off_t total = MIN(chars, remaining); + const off_t total = std::min(static_cast(chars), remaining); if (xe_copy_memory(buffer, total, (uint8_t*)memfile->buffer + memfile->offset, total)) { return -1; @@ -492,7 +493,7 @@ int mspack_memory_read(struct mspack_file *file, void *buffer, int chars) { int mspack_memory_write(struct mspack_file *file, void *buffer, int chars) { mspack_memory_file *memfile = (mspack_memory_file*)file; const off_t remaining = memfile->buffer_size - memfile->offset; - const off_t total = MIN(chars, remaining); + const off_t total = std::min(static_cast(chars), remaining); if (xe_copy_memory((uint8_t*)memfile->buffer + memfile->offset, memfile->buffer_size - memfile->offset, buffer, total)) { return -1; @@ -501,7 +502,6 @@ int mspack_memory_write(struct mspack_file *file, void *buffer, int chars) { return (int)total; } void *mspack_memory_alloc(struct mspack_system *sys, size_t chars) { - XEUNREFERENCED(sys); return xe_calloc(chars); } void mspack_memory_free(void *ptr) { @@ -876,7 +876,7 @@ int xe_xex2_load_pe(xe_xex2_ref xex) { for (size_t n = 0; n < filehdr->NumberOfSections; n++, sechdr++) { const size_t physical_address = opthdr->ImageBase + sechdr->VirtualAddress; upper_address = - MAX(upper_address, physical_address + sechdr->Misc.VirtualSize); + std::max(upper_address, physical_address + sechdr->Misc.VirtualSize); } // Setup/load sections. diff --git a/src/xenia/logging.cc b/src/xenia/logging.cc index 6ed64352d..0d181e26e 100644 --- a/src/xenia/logging.cc +++ b/src/xenia/logging.cc @@ -74,7 +74,7 @@ void xe_log_line(const char* file_path, const uint32_t line_number, #if 0// defined(OutputDebugString) OutputDebugStringA(buffer); #else - XEIGNORE(fprintf(stdout, buffer)); + fprintf(stdout, buffer); fflush(stdout); #endif // OutputDebugString if (!FLAGS_fast_stdout) { @@ -99,7 +99,7 @@ void xe_handle_fatal( #if defined(OutputDebugString) OutputDebugStringA(buffer); #else - XEIGNORE(fprintf(stderr, buffer)); + fprintf(stderr, buffer); fflush(stderr); #endif // OutputDebugString if (!FLAGS_fast_stdout) { diff --git a/src/xenia/types.h b/src/xenia/types.h index 972cad6c7..c15836d9f 100644 --- a/src/xenia/types.h +++ b/src/xenia/types.h @@ -18,8 +18,6 @@ #define XE_EMPTY_MACRO do { } while(0) -#define XEUNREFERENCED(expr) (void)(expr) - #define XEDECLARECLASS1(ns1, name) \ namespace ns1 { class name; } #define XEDECLARECLASS2(ns1, ns2, name) \ @@ -35,28 +33,6 @@ class name; \ } } } } -#if XE_COMPILER_MSVC -#define XEASSUME(expr) __analysis_assume(expr) -#else -#define XEASSUME(expr) -#endif // MSVC - -#if XE_COMPILER_MSVC -#define XECDECL __cdecl -#else -#define XECDECL -#endif // MSVC - -#if defined(__cplusplus) -#define XEEXTERNC extern "C" -#define XEEXTERNC_BEGIN extern "C" { -#define XEEXTERNC_END } -#else -#define XEEXTERNC extern -#define XEEXTERNC_BEGIN -#define XEEXTERNC_END -#endif // __cplusplus - #if XE_COMPILER_MSVC // http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx #define XEFORCEINLINE static __forceinline @@ -115,21 +91,6 @@ typedef XECACHEALIGN volatile void xe_aligned_void_t; #define XECOUNT(array) (sizeof(array) / sizeof(array[0])) #endif // MSVC -#if !defined(MIN) -#if XE_COMPILER_GNUC -#define MIN(A, B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); (__a < __b) ? __a : __b; }) -#define MAX(A, B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); (__a < __b) ? __b : __a; }) -//#elif XE_COMPILER_MSVC -// TODO(benvanik): experiment with decltype: -// http://msdn.microsoft.com/en-us/library/dd537655.aspx -#else -// NOTE: this implementation will evaluate the arguments twice - may be worth -// writing an inline function instead. -#define MIN(A, B) ( ((A) < (B)) ? (A) : (B) ) -#define MAX(A, B) ( ((A) < (B)) ? (B) : (A) ) -#endif // GNUC -#endif // !MIN - XEFORCEINLINE size_t hash_combine(size_t seed) { return seed; } @@ -153,7 +114,6 @@ static inline uint32_t XENEXTPOW2(uint32_t v) { } #define XEALIGN(value, align) ((value + align - 1) & ~(align - 1)) -#define XESUCCEED() goto XECLEANUP #define XEFAIL() goto XECLEANUP #define XEEXPECT(expr) if (!(expr) ) { goto XECLEANUP; } #define XEEXPECTTRUE(expr) if (!(expr) ) { goto XECLEANUP; } @@ -162,7 +122,6 @@ static inline uint32_t XENEXTPOW2(uint32_t v) { #define XEEXPECTNOTZERO(expr) if ( (expr) == 0 ) { goto XECLEANUP; } #define XEEXPECTNULL(expr) if ( (expr) != NULL ) { goto XECLEANUP; } #define XEEXPECTNOTNULL(expr) if ( (expr) == NULL ) { goto XECLEANUP; } -#define XEIGNORE(expr) do { (void)(expr); } while(0) #endif // XENIA_TYPES_H_ diff --git a/src/xenia/ui/win32/win32_window.cc b/src/xenia/ui/win32/win32_window.cc index 78f87bbf4..10f6aa6a6 100644 --- a/src/xenia/ui/win32/win32_window.cc +++ b/src/xenia/ui/win32/win32_window.cc @@ -169,7 +169,7 @@ bool Win32Window::set_title(const std::wstring& title) { if (!Window::set_title(title)) { return false; } - XEIGNORE(SetWindowText(handle_, title.c_str())); + SetWindowText(handle_, title.c_str()); return true; }