include/vcl/glyphitemcache.hxx | 2 +- vcl/source/gdi/impglyphitem.cxx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
New commits: commit e1bac51546138aa5b138f73fd61430cb8582b9c6 Author: Stephan Bergmann <[email protected]> AuthorDate: Tue May 31 16:50:34 2022 +0200 Commit: Stephan Bergmann <[email protected]> CommitDate: Tue May 31 20:32:37 2022 +0200 clang-cl wants VCL_DLLPUBLIC SalLayoutGlyphsCache::clear not to be inline ...to avoid > [build DEP] LNK:CppunitTest/test_vcl_text.dll.d > complextext.o : error LNK2019: unresolved external symbol "public: unsigned __int64 __cdecl SalLayoutGlyphsCache::GlyphsCost::operator()(class SalLayoutGlyphs const &)const " (??RGlyphsCost@SalLayoutGlyphsCache@@QEBA_KAEBVSalLayoutGlyphs@@@Z) referenced in function "private: void __cdecl o3tl::lru_map<struct SalLayoutGlyphsCache::CachedGlyphsKey,class SalLayoutGlyphs,struct SalLayoutGlyphsCache::CachedGlyphsHash,struct std::equal_to<struct SalLayoutGlyphsCache::CachedGlyphsKey>,struct SalLayoutGlyphsCache::GlyphsCost>::removeSize(class SalLayoutGlyphs const &)" (?removeSize@?$lru_map@UCachedGlyphsKey@SalLayoutGlyphsCache@@VSalLayoutGlyphs@@UCachedGlyphsHash@2@U?$equal_to@UCachedGlyphsKey@SalLayoutGlyphsCache@@@std@@UGlyphsCost@2@@o3tl@@AEAAXAEBVSalLayoutGlyphs@@@Z) (Not sure why MSVC itself doesn't complain; maybe LLVM 15 trunk clang-cl accidentally diverges from the MSVC semantics here.) Change-Id: I910fc309f9e02ec0794e449b97ba111d33dcbb54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135199 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/include/vcl/glyphitemcache.hxx b/include/vcl/glyphitemcache.hxx index 28c38d42ed07..30921e6920a0 100644 --- a/include/vcl/glyphitemcache.hxx +++ b/include/vcl/glyphitemcache.hxx @@ -55,7 +55,7 @@ public: const OUString& text, sal_Int32 nIndex, sal_Int32 nLen, tools::Long nLogicWidth = 0, const vcl::text::TextLayoutCache* layoutCache = nullptr); - void clear() { mCachedGlyphs.clear(); } + void clear(); static SalLayoutGlyphsCache* self(); SalLayoutGlyphsCache(int size) // needs to be public for vcl::DeleteOnDeinit diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx index 39c01699ea4e..124ae16f2e20 100644 --- a/vcl/source/gdi/impglyphitem.cxx +++ b/vcl/source/gdi/impglyphitem.cxx @@ -230,6 +230,8 @@ bool SalLayoutGlyphsImpl::IsValid() const return true; } +void SalLayoutGlyphsCache::clear() { mCachedGlyphs.clear(); } + SalLayoutGlyphsCache* SalLayoutGlyphsCache::self() { static vcl::DeleteOnDeinit<SalLayoutGlyphsCache> cache(
