From e1bac51546138aa5b138f73fd61430cb8582b9c6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 31 May 2022 16:50:34 +0200 Subject: 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::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 --- include/vcl/glyphitemcache.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/vcl') 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 -- cgit