diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-03-21 12:12:07 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-03-21 12:12:07 +0100 |
| commit | 49dae86edf4d1deb7f5e39f57f05a6656137ead1 (patch) | |
| tree | 5f87362bb657b4d7936663bcd9954bc873255c0e /src/drivers/Wayland | |
| parent | a9412b41bb7f1012402400e56d8dd71f93709f6f (diff) | |
Fix for issue #418 : some warnings about unused functions.
Diffstat (limited to 'src/drivers/Wayland')
| -rw-r--r-- | src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx index b6e921fc5..6cfeb092a 100644 --- a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx +++ b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx @@ -481,14 +481,6 @@ static const struct wl_data_device_listener data_device_listener = { const struct wl_data_device_listener *Fl_Wayland_Screen_Driver::p_data_device_listener = &data_device_listener; -static void read_int(uchar *c, int& i) { - i = *c; - i |= (*(++c))<<8; - i |= (*(++c))<<16; - i |= (*(++c))<<24; -} - - // Reads from the clipboard an image which can be in image/bmp or image/png MIME type. // Returns 0 if OK, != 0 if error. static int get_clipboard_image() { @@ -530,8 +522,8 @@ static int get_clipboard_image() { ssize_t n = read(fds[0], buf, sizeof(buf)); // read size info of the BMP image if (n == sizeof(buf)) { int w, h; // size of the BMP image - read_int(buf + 18, w); - read_int(buf + 22, h); + Fl_Unix_System_Driver::read_int(buf + 18, w); + Fl_Unix_System_Driver::read_int(buf + 22, h); int R = ((3*w+3)/4) * 4; // the number of bytes per row of BMP image, rounded up to multiple of 4 bmp = new char[R * h + 54]; memcpy(bmp, buf, 54); |
