From 7110de393a4175d01385ca10be20e8154bf2eb3e Mon Sep 17 00:00:00 2001 From: halx99 Date: Sat, 1 Jan 2022 21:21:34 +0800 Subject: [PATCH] Fix TTFconfig construct with nullable customGlyphCollection --- core/2d/CCLabel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/2d/CCLabel.h b/core/2d/CCLabel.h index fa3e5e57e8..55ccd3dbc3 100644 --- a/core/2d/CCLabel.h +++ b/core/2d/CCLabel.h @@ -66,7 +66,7 @@ typedef struct _ttfConfig _ttfConfig(std::string_view filePath = {}, float size = CC_DEFAULT_FONT_LABEL_SIZE, const GlyphCollection& glyphCollection = GlyphCollection::DYNAMIC, - std::string_view customGlyphCollection = {}, + const char* customGlyphCollection = nullptr, /* nullable */ bool useDistanceField = false, int outline = 0, bool useItalics = false, @@ -76,7 +76,7 @@ typedef struct _ttfConfig : fontFilePath(filePath) , fontSize(size) , glyphs(glyphCollection) - , customGlyphs(customGlyphCollection) + , customGlyphs(customGlyphCollection ? customGlyphCollection : "") , distanceFieldEnabled(useDistanceField) , outlineSize(outline) , italics(useItalics)