slideshow/source/inc/listenercontainer.hxx | 16 ---------------- 1 file changed, 16 deletions(-)
New commits: commit 4931872977d0412e6c1b40cc1e2955440abb8c92 Author: Alexandru Vasilescu <[email protected]> AuthorDate: Sun Dec 7 13:45:35 2025 +0200 Commit: Hossein <[email protected]> CommitDate: Wed Feb 18 11:52:52 2026 +0100 tdf#158337 Use C++20 std::erase instead of std::remove followed by erase NDK 27 comes with Clang 18, and now std::erase is supported: https://lists.freedesktop.org/archives/libreoffice/2025-February/093032.html Therefore, the whole condition over Android is no longer needed, and therefore removed. Change-Id: I9096a5ca4dd51d22f298ca17c676a1f1ee2a63f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195185 Reviewed-by: Hossein <[email protected]> Tested-by: Jenkins diff --git a/slideshow/source/inc/listenercontainer.hxx b/slideshow/source/inc/listenercontainer.hxx index af40fb3e6467..d44a60456de6 100644 --- a/slideshow/source/inc/listenercontainer.hxx +++ b/slideshow/source/inc/listenercontainer.hxx @@ -299,25 +299,9 @@ public: { Guard aGuard(*this); -// TODO : needed for the moment since ANDROID doesn't know size_t return from std::erase -#if defined ANDROID - const typename container_type::iterator aEnd( maListeners.end() ); - typename container_type::iterator aIter; - if( (aIter=std::remove(maListeners.begin(), - aEnd, - rListener)) == aEnd ) - { - return false; // listener not found - } - - maListeners.erase( aIter, aEnd ); - - return true; -#else size_t nb = std::erase(maListeners, rListener); // if nb == 0, it means listener wasn't found return (nb != 0); -#endif } /// Removes all listeners in one go
