summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-09-15 21:14:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-19 10:09:33 +0200
commitd469dca492e55798251c7f570bb730a38c32e893 (patch)
tree808c559f6dc8f7887dfd27eef318607e2df5f6ba /vcl/inc
parent21614aadc2b7a7bb6d2e00a5a081d8d233e4384b (diff)
loplugin:useuniqueptr in GetTTSimpleGlyphMetrics
and only return the advance, we don't use the other field Change-Id: I956033dac97763caea2b27404fe9f099da809899 Reviewed-on: https://gerrit.libreoffice.org/60703 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/sft.hxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index c09834adeaef..00cf119a4ca4 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -49,6 +49,7 @@
#include <vcl/fontcapabilities.hxx>
#include <i18nlangtag/lang.h>
+#include <memory>
#include <vector>
#include <cstdint>
@@ -113,7 +114,7 @@ namespace vcl
OVERLAP_COMPOUND = 1<<10
};
-/** Structure used by GetTTSimpleGlyphMetrics() and GetTTSimpleCharMetrics() functions */
+/** Structure used by GetTTSimpleCharMetrics() functions */
typedef struct {
sal_uInt16 adv; /**< advance width or height */
sal_Int16 sb; /**< left or top sidebearing */
@@ -377,7 +378,7 @@ namespace vcl
int nGlyphs);
/**
- * Queries glyph metrics. Allocates an array of TTSimpleGlyphMetrics structs and returns it.
+ * Queries glyph metrics. Allocates an array of advance width/height values and returns it.
*
* @param ttf pointer to the TrueTypeFont structure
* @param glyphArray pointer to an array of glyphs that are to be extracted from ttf
@@ -386,7 +387,7 @@ namespace vcl
* @ingroup sft
*
*/
- TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont const *ttf, const sal_uInt16 *glyphArray, int nGlyphs, bool vertical);
+ std::unique_ptr<sal_uInt16[]> GetTTSimpleGlyphMetrics(TrueTypeFont const *ttf, const sal_uInt16 *glyphArray, int nGlyphs, bool vertical);
#if defined(_WIN32) || defined(MACOSX) || defined(IOS)
/**