From 81a4b7329c631ce337d8dee8b98ab602aa5f8525 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 1 Mar 2021 11:20:03 +0100 Subject: Remove warnings about hidden virtual member functions. --- src/Fl_Graphics_Driver.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Fl_Graphics_Driver.cxx') diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 43e754130..547526ed3 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -575,7 +575,10 @@ Fl_Fontsize Fl_Graphics_Driver::size() {return size_; } double Fl_Graphics_Driver::width(const char *str, int nChars) { return 0; } /** Compute the width of Unicode character \p c if drawn with current font */ -double Fl_Graphics_Driver::width(unsigned int c) { char ch = (char)c; return width(&ch, 1); } +double Fl_Graphics_Driver::width(unsigned int c) { + char buf[4]; + return width(buf, fl_utf8encode (c, buf)); +} /** Return the current line height */ int Fl_Graphics_Driver::height() { return size(); } -- cgit v1.2.3