diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-25 15:56:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-28 08:44:58 +0200 |
commit | a7acea766c7812614b95257e934648cdf737ca3f (patch) | |
tree | 334c852f8d0ca9121f650c9372d0fa38dec871ce /sal/rtl | |
parent | 18c85f770bca04f71b03c4ca06da1a0488842512 (diff) |
loplugin:unusedmethods
Change-Id: I64df1f467986b3d70c058adff289a6dd8f00fb20
Reviewed-on: https://gerrit.libreoffice.org/54821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/alloc_arena.hxx | 1 | ||||
-rw-r--r-- | sal/rtl/alloc_cache.cxx | 18 |
2 files changed, 0 insertions, 19 deletions
diff --git a/sal/rtl/alloc_arena.hxx b/sal/rtl/alloc_arena.hxx index 120d0ec5ac45..8bc419e33090 100644 --- a/sal/rtl/alloc_arena.hxx +++ b/sal/rtl/alloc_arena.hxx @@ -114,7 +114,6 @@ extern rtl_arena_type * gp_default_arena; typedef void (*ArenaForeachFn)(void *addr, sal_Size size); void rtl_arena_foreach(rtl_arena_type *arena, ArenaForeachFn fn); -void rtl_cache_foreach(rtl_cache_type *arena, ArenaForeachFn foreachFn); #endif // INCLUDED_SAL_RTL_ALLOC_ARENA_HXX diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index f7dd02ab7c8a..38449ccfb795 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -1141,24 +1141,6 @@ void SAL_CALL rtl_cache_free( } } -// FIXME: foreachFn called for free'd blocks and will break free-chains. -void rtl_cache_foreach(rtl_cache_type *cache, ArenaForeachFn foreachFn) -{ - for (rtl_cache_slab_type *cur = &(cache->m_used_head); - cur && cur->m_slab_next != &(cache->m_used_head); - cur = cur->m_slab_next) - { - for (char *item = reinterpret_cast<char *>(cur->m_data); - item < reinterpret_cast<char *>(cur->m_bp); - item += cache->m_type_size) - { - foreachFn(item, cache->m_type_size); - } - } - - RTL_MEMORY_LOCK_RELEASE(&(cache->m_slab_lock)); -} - #if defined(SAL_UNX) void SAL_CALL rtl_secureZeroMemory(void *Ptr, sal_Size Bytes) SAL_THROW_EXTERN_C() |