vcl/source/font/PhysicalFontCollection.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
New commits: commit dc8026ed8cddcae6a01d516a06811da03524aaa1 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Aug 1 00:31:01 2025 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Aug 1 19:43:04 2025 +0200 Make this variable local to the scopes where it's used Change-Id: Ica78a9408fdd5e81620ed34c59f5e198567175e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188744 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Jenkins diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 7be28165fee3..11301ac80a93 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -1047,11 +1047,10 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily(FontSelectPattern& rF rFSD.maTargetName = aOrigName; // check if the current font name token or its substitute is valid - PhysicalFontFamily* pFoundData = ImplFindFontFamilyBySearchName(rFSD.maSearchName); - if( pFoundData ) + if (PhysicalFontFamily* pFoundData = ImplFindFontFamilyBySearchName(rFSD.maSearchName)) return pFoundData; - if (pFoundData = FindMetricCompatibleFont(rFSD); pFoundData) + if (PhysicalFontFamily* pFoundData = FindMetricCompatibleFont(rFSD)) return pFoundData; // some systems provide special customization @@ -1070,8 +1069,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily(FontSelectPattern& rF { rFSD.maTargetName = sStrippedName; rFSD.maSearchName = GetEnglishSearchFontName(rFSD.maTargetName); - pFoundData = ImplFindFontFamilyBySearchName(rFSD.maSearchName); - if( pFoundData ) + if (PhysicalFontFamily* pFoundData = ImplFindFontFamilyBySearchName(rFSD.maSearchName)) return pFoundData; } @@ -1084,8 +1082,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily(FontSelectPattern& rF // to restore the features to make the font selection data unique rFSD.maTargetName = aOrigName; - pFoundData = ImplFindFontFamilyBySearchName(rFSD.maSearchName); - if( pFoundData ) + if (PhysicalFontFamily* pFoundData = ImplFindFontFamilyBySearchName(rFSD.maSearchName)) return pFoundData; // break after last font name token was checked unsuccessfully