diff options
author | David Robillard <d@drobilla.net> | 2020-07-15 19:44:10 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-17 17:13:30 +0200 |
commit | 3a407188713ad1ae51ea8609fc3da4fd1fe8fd82 (patch) | |
tree | b1252cc21befaf14b569418ab9cc7d3003ffd038 /src | |
parent | 67c218947c94ad791903ce0a95b29851abc2b3ca (diff) | |
download | suil-3a407188713ad1ae51ea8609fc3da4fd1fe8fd82.tar.gz suil-3a407188713ad1ae51ea8609fc3da4fd1fe8fd82.tar.bz2 suil-3a407188713ad1ae51ea8609fc3da4fd1fe8fd82.zip |
Fix implicit conversion warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/qt5_in_gtk.cpp | 2 | ||||
-rw-r--r-- | src/x11_in_gtk2.c | 8 | ||||
-rw-r--r-- | src/x11_in_gtk3.c | 8 | ||||
-rw-r--r-- | src/x11_in_qt5.cpp | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/qt5_in_gtk.cpp b/src/qt5_in_gtk.cpp index e74ab5d..70a14c0 100644 --- a/src/qt5_in_gtk.cpp +++ b/src/qt5_in_gtk.cpp @@ -221,7 +221,7 @@ suil_wrapper_new(SuilHost* host, LV2_URID ui_updateRate = map->map(map->handle, LV2_UI__updateRate); for (LV2_Options_Option* o = options; o->key; ++o) { if (o->key == ui_updateRate) { - wrap->idle_ms = 1000.0f / *(const float*)o->value; + wrap->idle_ms = (guint)(1000.0f / *(const float*)o->value); break; } } diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c index a1ea21d..3041b07 100644 --- a/src/x11_in_gtk2.c +++ b/src/x11_in_gtk2.c @@ -294,7 +294,7 @@ forward_size_request(SuilX11Wrapper* socket, // Resize widget window XResizeWindow(GDK_WINDOW_XDISPLAY(window), (Window)socket->instance->ui_widget, - width, height); + (unsigned)width, (unsigned)height); // Get actual widget geometry Window root; @@ -308,8 +308,8 @@ forward_size_request(SuilX11Wrapper* socket, &ignored, &ignored); // Center widget in allocation - wx = (allocation->width - ww) / 2; - wy = (allocation->height - wh) / 2; + wx = (allocation->width - (int)ww) / 2; + wy = (allocation->height - (int)wh) / 2; XMoveWindow(GDK_WINDOW_XDISPLAY(window), (Window)socket->instance->ui_widget, wx, wy); @@ -559,7 +559,7 @@ suil_wrapper_new(SuilHost* host, LV2_URID ui_updateRate = map->map(map->handle, LV2_UI__updateRate); for (LV2_Options_Option* o = options; o->key; ++o) { if (o->key == ui_updateRate) { - wrap->idle_ms = 1000.0f / *(const float*)o->value; + wrap->idle_ms = (guint)(1000.0f / *(const float*)o->value); break; } } diff --git a/src/x11_in_gtk3.c b/src/x11_in_gtk3.c index 9f6e928..7faab02 100644 --- a/src/x11_in_gtk3.c +++ b/src/x11_in_gtk3.c @@ -217,7 +217,7 @@ forward_size_request(SuilX11Wrapper* socket, // Resize widget window XResizeWindow(GDK_WINDOW_XDISPLAY(window), (Window)socket->instance->ui_widget, - width, height); + (unsigned)width, (unsigned)height); // Get actual widget geometry Window root; @@ -231,8 +231,8 @@ forward_size_request(SuilX11Wrapper* socket, &ignored, &ignored); // Center widget in allocation - wx = (allocation->width - ww) / 2; - wy = (allocation->height - wh) / 2; + wx = (allocation->width - (int)ww) / 2; + wy = (allocation->height - (int)wh) / 2; XMoveWindow(GDK_WINDOW_XDISPLAY(window), (Window)socket->instance->ui_widget, wx, wy); @@ -466,7 +466,7 @@ suil_wrapper_new(SuilHost* host, LV2_URID ui_updateRate = map->map(map->handle, LV2_UI__updateRate); for (LV2_Options_Option* o = options; o->key; ++o) { if (o->key == ui_updateRate) { - wrap->idle_ms = 1000.0f / *(const float*)o->value; + wrap->idle_ms = (guint)(1000.0f / *(const float*)o->value); break; } } diff --git a/src/x11_in_qt5.cpp b/src/x11_in_qt5.cpp index 97a34dc..204d159 100644 --- a/src/x11_in_qt5.cpp +++ b/src/x11_in_qt5.cpp @@ -89,8 +89,8 @@ protected: if (_window) { XResizeWindow(QX11Info::display(), _window, - event->size().width(), - event->size().height()); + (unsigned)event->size().width(), + (unsigned)event->size().height()); } } |