summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-10 17:18:09 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-10 17:18:09 +0000
commitef7c9553811c8b45ada69260e9abf5d4444bcd51 (patch)
tree348e0cd0bd70a20075223c6a93093c41dba63ace /core/fxge
parent696a5293bb771d17c5f23b8ef73c0f961045ef30 (diff)
downloadpdfium-ef7c9553811c8b45ada69260e9abf5d4444bcd51.tar.xz
Consolidate const_casts<> in FXFT_Get_Name_Index()
There's a missing const in a qualifier in the third party FT library header, so rather than casting on every invocation, consolidate these into our wrapper macro. This may be easier to remove should the API ever get corrected. Part of the war on const_cast<>. Change-Id: I80cdb220730f40297e54aee10acc8bbd2c983b6d Reviewed-on: https://pdfium-review.googlesource.com/39850 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/fx_freetype.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxge/fx_freetype.h b/core/fxge/fx_freetype.h
index 8a5fd5dda3..4ce9139326 100644
--- a/core/fxge/fx_freetype.h
+++ b/core/fxge/fx_freetype.h
@@ -90,7 +90,7 @@ using FXFT_Outline_Funcs = FT_Outline_Funcs;
#define FXFT_Get_Glyph_Name(face, index, buffer, size) \
FT_Get_Glyph_Name(static_cast<FT_Face>(face), index, buffer, size)
#define FXFT_Get_Name_Index(face, name) \
- FT_Get_Name_Index(static_cast<FT_Face>(face), name)
+ FT_Get_Name_Index(static_cast<FT_Face>(face), const_cast<char*>(name))
#define FXFT_Has_Glyph_Names(face) \
(static_cast<FT_Face>(face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES)
#define FXFT_Get_Postscript_Name(face) \