From 5ed9dbd895fa15fa3bb03e8751e834cfa33aa16b Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 27 Oct 2012 12:46:53 +0100 Subject: Fix C++11 narrowing conversion errors (bzr r11834) --- src/widgets/eek-preview.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/widgets/eek-preview.cpp') diff --git a/src/widgets/eek-preview.cpp b/src/widgets/eek-preview.cpp index 953beb69d..72db91373 100644 --- a/src/widgets/eek-preview.cpp +++ b/src/widgets/eek-preview.cpp @@ -229,9 +229,14 @@ static gboolean eek_preview_draw(GtkWidget* widget, cairo_t* cr) GtkAllocation allocation; gtk_widget_get_allocation(widget, &allocation); EekPreview* preview = EEK_PREVIEW(widget); - GdkColor fg = { 0, preview->_r, preview->_g, preview->_b }; - gint insetTop = 0, insetBottom = 0; - gint insetLeft = 0, insetRight = 0; + + GdkColor fg = { 0, + static_cast(preview->_r), + static_cast(preview->_g), + static_cast(preview->_b)}; + + gint insetTop = 0, insetBottom = 0; + gint insetLeft = 0, insetRight = 0; if (preview->_border == BORDER_SOLID) { insetTop = 1; -- cgit v1.2.3