diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-03-01 11:20:03 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-03-01 11:20:15 +0100 |
| commit | 81a4b7329c631ce337d8dee8b98ab602aa5f8525 (patch) | |
| tree | 6037db4b38926d77bab6c8c756313ffca8c28b94 /src/Fl_Graphics_Driver.cxx | |
| parent | 49a78bc482bc112248a05f0b1ea78bcf80403efa (diff) | |
Remove warnings about hidden virtual member functions.
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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(); } |
