diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-22 13:11:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-23 07:54:51 +0100 |
commit | 9af8f190ed1bf3f76897ad0c078db16451d6fb69 (patch) | |
tree | 015089ee72a67eca7db999845cabb8104c8ce3aa /sal/rtl | |
parent | 9602e63c818722c3910343b7af53917d031861c8 (diff) |
More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some
more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More
loplugin:cstylecast"
Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862
Reviewed-on: https://gerrit.libreoffice.org/48317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/alloc_arena.cxx | 6 | ||||
-rw-r--r-- | sal/rtl/alloc_cache.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index 2d1d17c1378b..0ea1a39167ea 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -1062,7 +1062,7 @@ void * rtl_machdep_alloc( #if defined(SAL_UNX) addr = mmap (nullptr, static_cast<size_t>(size), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); #elif defined(_WIN32) - addr = VirtualAlloc (nullptr, (SIZE_T)size, MEM_COMMIT, PAGE_READWRITE); + addr = VirtualAlloc (nullptr, static_cast<SIZE_T>(size), MEM_COMMIT, PAGE_READWRITE); #endif /* (SAL_UNX || _WIN32) */ if (addr != MAP_FAILED) @@ -1092,7 +1092,7 @@ void rtl_machdep_free( #if defined(SAL_UNX) (void) munmap(pAddr, nSize); #elif defined(_WIN32) - (void) VirtualFree (pAddr, (SIZE_T)0, MEM_RELEASE); + (void) VirtualFree (pAddr, SIZE_T(0), MEM_RELEASE); #endif /* (SAL_UNX || _WIN32) */ } @@ -1107,7 +1107,7 @@ sal_Size rtl_machdep_pagesize() #elif defined(_WIN32) SYSTEM_INFO info; GetSystemInfo (&info); - return (sal_Size)info.dwPageSize; + return static_cast<sal_Size>(info.dwPageSize); #endif /* (SAL_UNX || _WIN32) */ } diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index a753b2060d20..56357d25ac38 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -1252,7 +1252,7 @@ static void rtl_cache_wsupdate_wait(unsigned int seconds) if (seconds > 0) { RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock)); - WaitForSingleObject (g_cache_list.m_update_cond, (DWORD)(seconds * 1000)); + WaitForSingleObject (g_cache_list.m_update_cond, static_cast<DWORD>(seconds * 1000)); RTL_MEMORY_LOCK_ACQUIRE(&(g_cache_list.m_lock)); } } |