From ac44dd4a6e8324ae9f79f61ef093cb087268d72d Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 1 Apr 2023 13:43:53 -0700 Subject: Allow inlining makeName Signed-off-by: Alan Coopersmith --- fonttosfnt.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'fonttosfnt.h') diff --git a/fonttosfnt.h b/fonttosfnt.h index 5a9decc..e0db06c 100644 --- a/fonttosfnt.h +++ b/fonttosfnt.h @@ -184,7 +184,6 @@ int writeFile(char *filename, FontPtr); char *sprintf_alloc(const char *f, ...); char *vsprintf_alloc(const char *f, va_list args); char *makeUTF16(const char *); -unsigned makeName(const char*); int macTime(int *, unsigned *); unsigned faceFoundry(FT_Face); char *faceEncoding(FT_Face); @@ -196,4 +195,10 @@ int faceWidth(FT_Face); int faceItalicAngle(FT_Face); int degreesToFraction(int, int*, int*); +static inline unsigned int +makeName(const char *s) +{ + return s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]; +} + #endif /* _FONTTOSFNT_H_ */ -- cgit v1.2.3