diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-12-25 22:50:08 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@googlemail.com> | 2012-12-25 22:50:08 +0000 |
| commit | 8ee9827502fadcae0b02fec434799e94ee115357 (patch) | |
| tree | a2cac37646ad35f34b9eef93d3247e5468b66032 /src/extension/internal | |
| parent | Stop using UNUSED_PIXELS hack in ruler. This was only required because of th... (diff) | |
| download | inkscape-8ee9827502fadcae0b02fec434799e94ee115357.tar.gz inkscape-8ee9827502fadcae0b02fec434799e94ee115357.zip | |
Convert a load more C-style pointer casts to GObject or C++ casts (merry christmas\!)
(bzr r11986)
Diffstat (limited to 'src/extension/internal')
| -rw-r--r-- | src/extension/internal/pdf-input-cairo.cpp | 8 | ||||
| -rw-r--r-- | src/extension/internal/pdfinput/pdf-input.cpp | 6 | ||||
| -rw-r--r-- | src/extension/internal/vsd-input.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp index 03b7c0a90..0a9dd8399 100644 --- a/src/extension/internal/pdf-input-cairo.cpp +++ b/src/extension/internal/pdf-input-cairo.cpp @@ -229,7 +229,7 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc) this->get_vbox()->pack_start(*hbox1); this->set_title(_("PDF Import Settings")); this->set_modal(true); - sp_transientize((GtkWidget *)this->gobj()); //Make transient + sp_transientize(GTK_WIDGET(this->gobj())); //Make transient this->property_window_position().set_value(Gtk::WIN_POS_NONE); this->set_resizable(true); this->property_destroy_with_parent().set_value(false); @@ -416,7 +416,7 @@ static void copy_cairo_surface_to_pixbuf (cairo_surface_t *surface, cairo_height = gdk_pixbuf_get_height (pixbuf); for (y = 0; y < cairo_height; y++) { - src = (unsigned int *) (cairo_data + y * cairo_rowstride); + src = reinterpret_cast<unsigned int *>(cairo_data + y * cairo_rowstride); dst = pixbuf_data + y * pixbuf_rowstride; for (x = 0; x < cairo_width; x++) { @@ -622,8 +622,8 @@ PdfInputCairo::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri) { static cairo_status_t _write_ustring_cb(void *closure, const unsigned char *data, unsigned int length) { - Glib::ustring* stream = (Glib::ustring*)closure; - stream->append((const char*)data, length); + Glib::ustring* stream = static_cast<Glib::ustring*>(closure); + stream->append(reinterpret_cast<const char*>(data), length); return CAIRO_STATUS_SUCCESS; } diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index 688e3f612..2c66c0daf 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -245,7 +245,7 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/) this->get_vbox()->pack_start(*hbox1); this->set_title(_("PDF Import Settings")); this->set_modal(true); - sp_transientize((GtkWidget *)this->gobj()); //Make transient + sp_transientize(GTK_WIDGET(this->gobj())); //Make transient this->property_window_position().set_value(Gtk::WIN_POS_NONE); this->set_resizable(true); this->property_destroy_with_parent().set_value(false); @@ -446,7 +446,7 @@ static void copy_cairo_surface_to_pixbuf (cairo_surface_t *surface, cairo_height = gdk_pixbuf_get_height (pixbuf); for (y = 0; y < cairo_height; y++) { - src = (unsigned int *) (cairo_data + y * cairo_rowstride); + src = reinterpret_cast<unsigned int *>(cairo_data + y * cairo_rowstride); dst = pixbuf_data + y * pixbuf_rowstride; for (x = 0; x < cairo_width; x++) { @@ -603,7 +603,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { PDFDoc *pdf_doc = new PDFDoc(filename_goo, NULL, NULL, NULL); // TODO: Could ask for password //delete filename_goo; #else - wchar_t *wfilename = (wchar_t*)g_utf8_to_utf16 (uri, -1, NULL, NULL, NULL); + wchar_t *wfilename = static_cast<wchar_t*>(g_utf8_to_utf16 (uri, -1, NULL, NULL, NULL)); if (wfilename == NULL) { return NULL; diff --git a/src/extension/internal/vsd-input.cpp b/src/extension/internal/vsd-input.cpp index 54b570258..187318417 100644 --- a/src/extension/internal/vsd-input.cpp +++ b/src/extension/internal/vsd-input.cpp @@ -142,7 +142,7 @@ VsdImportDialog::VsdImportDialog(const std::vector<WPXString> &vec) this->get_vbox()->pack_start(*vbox2); this->set_title(_("Page Selector")); this->set_modal(true); - sp_transientize((GtkWidget *)this->gobj()); //Make transient + sp_transientize(GTK_WIDGET(this->gobj())); //Make transient this->property_window_position().set_value(Gtk::WIN_POS_NONE); this->set_resizable(true); this->property_destroy_with_parent().set_value(false); |
