Mercurial > octave
changeset 23447:db1fdf4384dd
maint: Use convention "static_cast<void *>" for casting of pointers.
* Backend.cc, BaseControl.cc, ButtonControl.cc, ButtonGroup.cc, Canvas.cc,
Container.cc, ContextMenu.cc, Figure.cc, ListBoxControl.cc, Menu.cc,
MouseModeActionGroup.cc, Object.cc, Object.h, Panel.cc, RadioButtonControl.cc,
ToggleButtonControl.cc, ToolBar.cc, ToolBarButton.cc, annotation-dialog.cc,
file-editor-tab.cc, main-window.cc, webinfo.cc, data.cc, ft-text-renderer.cc,
graphics.in.h, zfstream.h, __init_fltk__.cc, __osmesa_print__.cc, gzip.cc,
ov-java.cc, bp-table.cc, oct-time.cc, lo-utils.cc, oct-base64.cc,
url-transfer.cc:
Use convention "static_cast<void *>" for casting of pointers.
line wrap: on
line diff
--- a/libgui/graphics/Backend.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/Backend.cc Thu Apr 27 10:04:31 2017 -0700 @@ -217,7 +217,7 @@ { OCTAVE_INTPTR_TYPE ptr = ov.OCTAVE_PTR_SCALAR ().value (); - return reinterpret_cast<ObjectProxy*> (ptr); + return reinterpret_cast<ObjectProxy *> (ptr); } }
--- a/libgui/graphics/BaseControl.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/BaseControl.cc Thu Apr 27 10:04:31 2017 -0700 @@ -195,7 +195,7 @@ { gh_manager::auto_lock lock; - QMouseEvent* m = dynamic_cast<QMouseEvent*> (xevent); + QMouseEvent *m = dynamic_cast<QMouseEvent *> (xevent); graphics_object go = object (); uicontrol::properties& up = Utils::properties<uicontrol> (go); graphics_object fig = go.get_ancestor ("figure"); @@ -232,7 +232,7 @@ { gh_manager::auto_lock lock; - QMouseEvent* m = dynamic_cast<QMouseEvent*> (xevent); + QMouseEvent *m = dynamic_cast<QMouseEvent *> (xevent); graphics_object go = object (); graphics_object fig = go.get_ancestor ("figure"); @@ -248,7 +248,7 @@ gh_manager::auto_lock lock; octave_scalar_map keyData = - Utils::makeKeyEventStruct (dynamic_cast<QKeyEvent*> (xevent)); + Utils::makeKeyEventStruct (dynamic_cast<QKeyEvent *> (xevent)); graphics_object fig = object ().get_ancestor ("figure"); gh_manager::post_set (fig.get_handle (), "currentcharacter",
--- a/libgui/graphics/ButtonControl.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/ButtonControl.cc Thu Apr 27 10:04:31 2017 -0700 @@ -94,7 +94,7 @@ { Object* parent = Object::parentObject (gh_manager::get_object ( up.get___myhandle__ ())); - ButtonGroup* btnGroup = dynamic_cast<ButtonGroup*>(parent); + ButtonGroup* btnGroup = dynamic_cast<ButtonGroup *>(parent); if (btnGroup) btnGroup->selectNothing (); }
--- a/libgui/graphics/ButtonGroup.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/ButtonGroup.cc Thu Apr 27 10:04:31 2017 -0700 @@ -209,7 +209,7 @@ case QEvent::MouseButtonPress: { - QMouseEvent* m = dynamic_cast<QMouseEvent*> (xevent); + QMouseEvent* m = dynamic_cast<QMouseEvent *> (xevent); if (m->button () == Qt::RightButton) { @@ -350,9 +350,9 @@ gh_manager::auto_lock lock; graphics_object go = gh_manager::get_object (h); Object* selectedObject = Backend::toolkitObject (go); - ToggleButtonControl* toggle = static_cast<ToggleButtonControl*> + ToggleButtonControl* toggle = static_cast<ToggleButtonControl *> (selectedObject); - RadioButtonControl* radio = static_cast<RadioButtonControl*>(selectedObject); + RadioButtonControl* radio = static_cast<RadioButtonControl *>(selectedObject); if (toggle) { go.get_properties ().set ("value", 1);
--- a/libgui/graphics/Canvas.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/Canvas.cc Thu Apr 27 10:04:31 2017 -0700 @@ -563,7 +563,7 @@ // FIXME: should we use signal/slot mechanism instead of // directly calling parent fig methods Figure* fig = - dynamic_cast<Figure*> (Backend::toolkitObject (figObj)); + dynamic_cast<Figure *> (Backend::toolkitObject (figObj)); axes::properties& ap = Utils::properties<axes> (axesObj); if (fig) @@ -649,7 +649,7 @@ Utils::properties<figure> (figObj).set_currentobject ( octave::numeric_limits<double>::NaN ()); - Figure* fig = dynamic_cast<Figure*> (Backend::toolkitObject (figObj)); + Figure* fig = dynamic_cast<Figure *> (Backend::toolkitObject (figObj)); MouseMode newMouseMode = NoMode; @@ -929,7 +929,7 @@ graphics_object figObj (obj.get_ancestor ("figure")); - Figure* fig = dynamic_cast<Figure*> (Backend::toolkitObject (figObj)); + Figure* fig = dynamic_cast<Figure *> (Backend::toolkitObject (figObj)); if (fig) newMouseMode = fig->mouseMode ();
--- a/libgui/graphics/Container.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/Container.cc Thu Apr 27 10:04:31 2017 -0700 @@ -116,7 +116,7 @@ if (obj && obj->isWidgetType ()) { - QWidget *widget = qobject_cast<QWidget*> (obj); + QWidget *widget = qobject_cast<QWidget *> (obj); if (widget) widget->setMouseTracking (hasMouseTracking ());
--- a/libgui/graphics/ContextMenu.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/ContextMenu.cc Thu Apr 27 10:04:31 2017 -0700 @@ -122,7 +122,7 @@ if (go.valid_object ()) { ContextMenu* cMenu = - dynamic_cast<ContextMenu*> (Backend::toolkitObject (go)); + dynamic_cast<ContextMenu *> (Backend::toolkitObject (go)); if (cMenu) {
--- a/libgui/graphics/Figure.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/Figure.cc Thu Apr 27 10:04:31 2017 -0700 @@ -606,7 +606,7 @@ { gh_manager::auto_lock lock; - UpdateBoundingBoxData* d = reinterpret_cast<UpdateBoundingBoxData*> (data); + UpdateBoundingBoxData* d = reinterpret_cast<UpdateBoundingBoxData *> (data); graphics_object go = gh_manager::get_object (d->m_handle); if (go.valid_object ()) @@ -696,7 +696,7 @@ break; case QEvent::ActionRemoved: { - QAction* a = dynamic_cast<QActionEvent*> (xevent)->action (); + QAction* a = dynamic_cast<QActionEvent *> (xevent)->action (); if (! a->isSeparator () && a->objectName () != "builtinMenu") @@ -740,7 +740,7 @@ break; case QEvent::ChildAdded: - if (dynamic_cast<QChildEvent*> (xevent)->child + if (dynamic_cast<QChildEvent *> (xevent)->child ()->isWidgetType()) { gh_manager::auto_lock lock; @@ -750,7 +750,7 @@ } case QEvent::ChildRemoved: - if (dynamic_cast<QChildEvent*> (xevent)->child + if (dynamic_cast<QChildEvent *> (xevent)->child ()->isWidgetType()) { gh_manager::auto_lock lock; @@ -768,7 +768,7 @@ case QEvent::ActionChanged: // The menubar may have been resized if no action is visible { - QAction* a = dynamic_cast<QActionEvent*> (xevent)->action (); + QAction* a = dynamic_cast<QActionEvent *> (xevent)->action (); if (m_menuBar->sizeHint ().height () != m_previousHeight && a->objectName () != "builtinMenu" && ! a->isSeparator ()) @@ -777,7 +777,7 @@ break; case QEvent::ActionAdded: { - QAction* a = dynamic_cast<QActionEvent*> (xevent)->action (); + QAction* a = dynamic_cast<QActionEvent *> (xevent)->action (); if (! a->isSeparator () && a->objectName () != "builtinMenu"
--- a/libgui/graphics/ListBoxControl.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/ListBoxControl.cc Thu Apr 27 10:04:31 2017 -0700 @@ -230,7 +230,7 @@ { case QEvent::MouseButtonPress: { - QMouseEvent* m = dynamic_cast<QMouseEvent*> (e); + QMouseEvent* m = dynamic_cast<QMouseEvent *> (e); if (m->button () & Qt::RightButton) override_return = true; @@ -244,7 +244,7 @@ } case QEvent::MouseButtonRelease: { - QMouseEvent* m = dynamic_cast<QMouseEvent*> (e); + QMouseEvent* m = dynamic_cast<QMouseEvent *> (e); if (m->button () & Qt::RightButton) override_return = true;
--- a/libgui/graphics/Menu.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/Menu.cc Thu Apr 27 10:04:31 2017 -0700 @@ -97,7 +97,7 @@ m_separator->setVisible (up.is_visible ()); } - MenuContainer* menuContainer = dynamic_cast<MenuContainer*> (xparent); + MenuContainer* menuContainer = dynamic_cast<MenuContainer *> (xparent); if (menuContainer) m_parent = menuContainer->menu ();
--- a/libgui/graphics/MouseModeActionGroup.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/MouseModeActionGroup.cc Thu Apr 27 10:04:31 2017 -0700 @@ -76,7 +76,7 @@ } else { - int i = m_actions.indexOf (qobject_cast<QAction*> (sender ())); + int i = m_actions.indexOf (qobject_cast<QAction *> (sender ())); if (i >= 0) {
--- a/libgui/graphics/Object.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/Object.cc Thu Apr 27 10:04:31 2017 -0700 @@ -178,7 +178,7 @@ QVariant v = obj->property ("QtHandles::Object"); if (v.isValid ()) - return reinterpret_cast<Object*> (qvariant_cast<void*> (v)); + return reinterpret_cast<Object *> (qvariant_cast<void*> (v)); return 0; }
--- a/libgui/graphics/Object.h Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/Object.h Thu Apr 27 10:04:31 2017 -0700 @@ -71,7 +71,7 @@ virtual QObject* qObject (void) { return m_qobject; } template <typename T> - T* qWidget (void) { return qobject_cast<T*>(qObject ()); } + T* qWidget (void) { return qobject_cast<T *>(qObject ()); } virtual Container* innerContainer (void) = 0;
--- a/libgui/graphics/Panel.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/Panel.cc Thu Apr 27 10:04:31 2017 -0700 @@ -184,7 +184,7 @@ case QEvent::MouseButtonPress: { - QMouseEvent* m = dynamic_cast<QMouseEvent*> (xevent); + QMouseEvent* m = dynamic_cast<QMouseEvent *> (xevent); if (m->button () == Qt::RightButton) {
--- a/libgui/graphics/RadioButtonControl.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/RadioButtonControl.cc Thu Apr 27 10:04:31 2017 -0700 @@ -55,7 +55,7 @@ : ButtonControl (go, radio) { Object* parent = Object::parentObject (go); - ButtonGroup* btnGroup = dynamic_cast<ButtonGroup*>(parent); + ButtonGroup* btnGroup = dynamic_cast<ButtonGroup *>(parent); if (btnGroup) btnGroup->addButton (radio);
--- a/libgui/graphics/ToggleButtonControl.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/ToggleButtonControl.cc Thu Apr 27 10:04:31 2017 -0700 @@ -55,7 +55,7 @@ : ButtonControl (go, btn) { Object* parent = Object::parentObject (go); - ButtonGroup* btnGroup = dynamic_cast<ButtonGroup*>(parent); + ButtonGroup* btnGroup = dynamic_cast<ButtonGroup *>(parent); if (btnGroup) btnGroup->addButton (btn);
--- a/libgui/graphics/ToolBar.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/ToolBar.cc Thu Apr 27 10:04:31 2017 -0700 @@ -91,7 +91,7 @@ m_empty = addEmptyAction (bar); m_figure = - dynamic_cast<Figure*> (Object::fromQObject (bar->parentWidget ())); + dynamic_cast<Figure *> (Object::fromQObject (bar->parentWidget ())); if (m_figure) m_figure->addCustomToolBar (bar, tp.is_visible ()); @@ -131,7 +131,7 @@ case QEvent::ActionAdded: case QEvent::ActionRemoved: { - QActionEvent* ae = dynamic_cast<QActionEvent*> (xevent); + QActionEvent* ae = dynamic_cast<QActionEvent *> (xevent); QToolBar* bar = qWidget<QToolBar> (); if (ae->action () != m_empty)
--- a/libgui/graphics/ToolBarButton.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/ToolBarButton.cc Thu Apr 27 10:04:31 2017 -0700 @@ -51,7 +51,7 @@ } action->setEnabled (tp.is_enable ()); - QWidget* w = qobject_cast<QWidget*> (action->parent ()); + QWidget* w = qobject_cast<QWidget *> (action->parent ()); w->insertAction (w->actions ().back (), action); if (m_separator) @@ -98,7 +98,7 @@ m_separator->setSeparator (true); m_separator->setVisible (tp.is_visible ()); - QWidget* w = qobject_cast<QWidget*> (action->parent ()); + QWidget* w = qobject_cast<QWidget *> (action->parent ()); w->insertAction (action, m_separator); }
--- a/libgui/graphics/annotation-dialog.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/graphics/annotation-dialog.cc Thu Apr 27 10:04:31 2017 -0700 @@ -265,7 +265,7 @@ void annotation_dialog::prompt_for_color () { - QWidget *widg = dynamic_cast<QWidget*> (sender ()); + QWidget *widg = dynamic_cast<QWidget *> (sender ()); if (widg) { QColor color = widg->palette ().color (QPalette::Button);
--- a/libgui/src/m-editor/file-editor-tab.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/src/m-editor/file-editor-tab.cc Thu Apr 27 10:04:31 2017 -0700 @@ -2003,7 +2003,7 @@ QSizePolicy::Fixed), 1,5); // and add the extra grid layout to the dialog's layout - QGridLayout *dialog_layout = dynamic_cast<QGridLayout*> (fileDialog->layout ()); + QGridLayout *dialog_layout = dynamic_cast<QGridLayout *> (fileDialog->layout ()); dialog_layout->addLayout (extra,dialog_layout->rowCount (),0, 1,dialog_layout->columnCount ());
--- a/libgui/src/main-window.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/src/main-window.cc Thu Apr 27 10:04:31 2017 -0700 @@ -1454,7 +1454,7 @@ QSizePolicy::Fixed), 1,2); // and add the extra grid layout to the dialog's layout - QGridLayout *dialog_layout = dynamic_cast<QGridLayout*> ( + QGridLayout *dialog_layout = dynamic_cast<QGridLayout *> ( fileDialog->layout ()); dialog_layout->addLayout (extra,dialog_layout->rowCount (),0, 1,dialog_layout->columnCount ());
--- a/libgui/src/qtinfo/webinfo.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libgui/src/qtinfo/webinfo.cc Thu Apr 27 10:04:31 2017 -0700 @@ -225,7 +225,7 @@ webinfo::current_tab_changed (int index) { QVariant tab_data = _tab_bar->tabData (index); - _text_browser = static_cast<QTextBrowser*> (tab_data.value<void*> ()); + _text_browser = static_cast<QTextBrowser *> (tab_data.value<void*> ()); _stacked_widget->setCurrentIndex (_stacked_widget->indexOf (_text_browser)); @@ -255,7 +255,7 @@ int nt = _tab_bar->addTab (name); _tab_bar->setCurrentIndex (nt); QVariant tab_data; - tab_data.setValue (static_cast<void*> (_text_browser)); + tab_data.setValue (static_cast<void *> (_text_browser)); _tab_bar->setTabData (nt, tab_data); connect (_tab_bar, SIGNAL (currentChanged (int)), this, @@ -276,7 +276,7 @@ if (_tab_bar->count () > 1) { QVariant tab_data = _tab_bar->tabData (index); - QWidget *w = static_cast<QWidget*> (tab_data.value<void*> ()); + QWidget *w = static_cast<QWidget *> (tab_data.value<void*> ()); _stacked_widget->removeWidget (w); delete w;
--- a/libinterp/corefcn/data.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libinterp/corefcn/data.cc Thu Apr 27 10:04:31 2017 -0700 @@ -7740,18 +7740,18 @@ if (args(0).is_integer_type ()) { -#define MAKE_INT_BRANCH(X) \ - if (args(0).is_ ## X ## _type ()) \ - { \ - const X##NDArray in = args(0). X## _array_value (); \ - size_t inlen = in.numel () * sizeof (X## _t) / sizeof (char); \ - const char* inc = reinterpret_cast<const char*> (in.data ()); \ - char* out; \ - if (octave_base64_encode (inc, inlen, &out)) \ - { \ - retval(0) = octave_value (out); \ - ::free (out); \ - } \ +#define MAKE_INT_BRANCH(X) \ + if (args(0).is_ ## X ## _type ()) \ + { \ + const X##NDArray in = args(0). X## _array_value (); \ + size_t inlen = in.numel () * sizeof (X## _t) / sizeof (char); \ + const char* inc = reinterpret_cast<const char *> (in.data ()); \ + char* out; \ + if (octave_base64_encode (inc, inlen, &out)) \ + { \ + retval(0) = octave_value (out); \ + ::free (out); \ + } \ } MAKE_INT_BRANCH(int8) @@ -7774,7 +7774,7 @@ size_t inlen; inlen = in.numel () * sizeof (float) / sizeof (char); const char* inc; - inc = reinterpret_cast<const char*> (in.data ()); + inc = reinterpret_cast<const char *> (in.data ()); char* out; if (octave_base64_encode (inc, inlen, &out)) { @@ -7788,7 +7788,7 @@ size_t inlen; inlen = in.numel () * sizeof (double) / sizeof (char); const char* inc; - inc = reinterpret_cast<const char*> (in.data ()); + inc = reinterpret_cast<const char *> (in.data ()); char* out; if (octave_base64_encode (inc, inlen, &out)) {
--- a/libinterp/corefcn/ft-text-renderer.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libinterp/corefcn/ft-text-renderer.cc Thu Apr 27 10:04:31 2017 -0700 @@ -228,7 +228,7 @@ FcPattern *pat = FcPatternCreate (); FcPatternAddString (pat, FC_FAMILY, - (reinterpret_cast<const FcChar8*> + (reinterpret_cast<const FcChar8 *> (name == "*" ? "sans" : name.c_str ()))); FcPatternAddInteger (pat, FC_WEIGHT, fc_weight); @@ -250,7 +250,7 @@ unsigned char *tmp; FcPatternGetString (match, FC_FILE, 0, &tmp); - file = reinterpret_cast<char*> (tmp); + file = reinterpret_cast<char *> (tmp); } else ::warning ("could not match any font: %s-%s-%s-%g", @@ -302,7 +302,7 @@ { if (face->generic.data) { - ft_key *pkey = reinterpret_cast<ft_key*> (face->generic.data); + ft_key *pkey = reinterpret_cast<ft_key *> (face->generic.data); cache.erase (*pkey); delete pkey;
--- a/libinterp/corefcn/graphics.in.h Thu Apr 27 09:48:57 2017 -0700 +++ b/libinterp/corefcn/graphics.in.h Thu Apr 27 10:04:31 2017 -0700 @@ -2034,22 +2034,22 @@ #if 0 const string_property& as_string_property (void) const - { return *(dynamic_cast<string_property*> (rep)); } + { return *(dynamic_cast<string_property *> (rep)); } const radio_property& as_radio_property (void) const - { return *(dynamic_cast<radio_property*> (rep)); } + { return *(dynamic_cast<radio_property *> (rep)); } const color_property& as_color_property (void) const - { return *(dynamic_cast<color_property*> (rep)); } + { return *(dynamic_cast<color_property *> (rep)); } const double_property& as_double_property (void) const - { return *(dynamic_cast<double_property*> (rep)); } + { return *(dynamic_cast<double_property *> (rep)); } const bool_property& as_bool_property (void) const - { return *(dynamic_cast<bool_property*> (rep)); } + { return *(dynamic_cast<bool_property *> (rep)); } const handle_property& as_handle_property (void) const - { return *(dynamic_cast<handle_property*> (rep)); } + { return *(dynamic_cast<handle_property *> (rep)); } #endif private:
--- a/libinterp/corefcn/zfstream.h Thu Apr 27 09:48:57 2017 -0700 +++ b/libinterp/corefcn/zfstream.h Thu Apr 27 10:04:31 2017 -0700 @@ -304,7 +304,7 @@ */ gzfilebuf* rdbuf () const - { return const_cast<gzfilebuf*>(&sb); } + { return const_cast<gzfilebuf *>(&sb); } /** * @brief Check if file is open. @@ -391,7 +391,7 @@ */ gzfilebuf* rdbuf () const - { return const_cast<gzfilebuf*>(&sb); } + { return const_cast<gzfilebuf *>(&sb); } /** * @brief Check if file is open.
--- a/libinterp/dldfcn/__init_fltk__.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libinterp/dldfcn/__init_fltk__.cc Thu Apr 27 10:04:31 2017 -0700 @@ -301,7 +301,7 @@ void script_cb (Fl_Widget*, void* data) { - static_cast<uimenu::properties*> (data)->execute_callback (); + static_cast<uimenu::properties *> (data)->execute_callback (); } class fltk_uimenu @@ -320,7 +320,7 @@ for (int t = 0; t < len; t++) { const Fl_Menu_Item *m - = static_cast<const Fl_Menu_Item*> (&(m_menubar->menu ()[t])); + = static_cast<const Fl_Menu_Item *> (&(m_menubar->menu ()[t])); if (m->label () && m->visible ()) n++; @@ -357,7 +357,7 @@ std::string menupath; for (int t = 0; t < m_menubar->size (); t++) { - Fl_Menu_Item *m = const_cast<Fl_Menu_Item*> (&(m_menubar->menu ()[t])); + Fl_Menu_Item *m = const_cast<Fl_Menu_Item *> (&(m_menubar->menu ()[t])); if (m->submenu ()) { // item has submenu @@ -453,7 +453,7 @@ if (! fltk_label.empty ()) { Fl_Menu_Item* item = - const_cast<Fl_Menu_Item*> (m_menubar->find_item (fltk_label.c_str ())); + const_cast<Fl_Menu_Item *> (m_menubar->find_item (fltk_label.c_str ())); if (item) { std::string acc = uimenup.get_accelerator (); @@ -472,14 +472,14 @@ if (! fltk_label.empty ()) { Fl_Menu_Item* item - = const_cast<Fl_Menu_Item*> (m_menubar->find_item (fltk_label.c_str ())); + = const_cast<Fl_Menu_Item *> (m_menubar->find_item (fltk_label.c_str ())); if (item) { if (! uimenup.get_callback ().is_empty ()) - item->callback (static_cast<Fl_Callback*> (script_cb), - static_cast<void*> (&uimenup)); + item->callback (static_cast<Fl_Callback *> (script_cb), + static_cast<void *> (&uimenup)); else - item->callback (0, static_cast<void*> (0)); + item->callback (0, static_cast<void *> (0)); } } } @@ -490,7 +490,7 @@ if (! fltk_label.empty ()) { Fl_Menu_Item* item - = const_cast<Fl_Menu_Item*> (m_menubar->find_item (fltk_label.c_str ())); + = const_cast<Fl_Menu_Item *> (m_menubar->find_item (fltk_label.c_str ())); if (item) { if (uimenup.is_enable ()) @@ -507,7 +507,7 @@ if (! fltk_label.empty ()) { Fl_Menu_Item* item - = const_cast<Fl_Menu_Item*> (m_menubar->find_item (fltk_label.c_str ())); + = const_cast<Fl_Menu_Item *> (m_menubar->find_item (fltk_label.c_str ())); if (item) { Matrix rgb = uimenup.get_foregroundcolor_rgb (); @@ -535,7 +535,7 @@ for (idx = curr_idx - 1; idx >= 0; idx--) { Fl_Menu_Item* item - = const_cast<Fl_Menu_Item*> (&m_menubar->menu () [idx]); + = const_cast<Fl_Menu_Item *> (&m_menubar->menu () [idx]); itemflags = item->flags; if (item->label ()) break; @@ -560,7 +560,7 @@ if (! fltk_label.empty ()) { Fl_Menu_Item* item - = const_cast<Fl_Menu_Item*> (m_menubar->find_item (fltk_label.c_str ())); + = const_cast<Fl_Menu_Item *> (m_menubar->find_item (fltk_label.c_str ())); if (item) { if (uimenup.is_visible ()) @@ -784,7 +784,7 @@ m_help (0), m_status (0), m_resize_dummy (0), m_ax_obj (), m_pos_x (0), m_pos_y (0) { - callback (window_close, static_cast<void*> (this)); + callback (window_close, static_cast<void *> (this)); // The size of the resize_dummy box also determines the minimum // window size. @@ -821,23 +821,23 @@ m_status->box (FL_ENGRAVED_BOX); m_autoscale = new Fl_Button (0, toolbar_y, m_status_h, m_status_h, "A"); - m_autoscale->callback (button_callback, static_cast<void*> (this)); + m_autoscale->callback (button_callback, static_cast<void *> (this)); m_autoscale->tooltip ("Autoscale"); m_togglegrid = new Fl_Button (m_status_h, toolbar_y, m_status_h, m_status_h, "G"); - m_togglegrid->callback (button_callback, static_cast<void*> (this)); + m_togglegrid->callback (button_callback, static_cast<void *> (this)); m_togglegrid->tooltip ("Toggle Grid"); m_panzoom = new Fl_Button (2* m_status_h, toolbar_y, m_status_h, m_status_h, "P"); - m_panzoom->callback (button_callback, static_cast<void*> (this)); + m_panzoom->callback (button_callback, static_cast<void *> (this)); m_panzoom->tooltip ("Mouse Pan/Zoom"); m_rotate = new Fl_Button (3 * m_status_h, toolbar_y, m_status_h, m_status_h, "R"); - m_rotate->callback (button_callback, static_cast<void*> (this)); + m_rotate->callback (button_callback, static_cast<void *> (this)); m_rotate->tooltip ("Mouse Rotate"); m_help = new Fl_Button (4 * m_status_h, toolbar_y, m_status_h, m_status_h, "?"); - m_help->callback (button_callback, static_cast<void*> (this)); + m_help->callback (button_callback, static_cast<void *> (this)); m_help->tooltip ("Help"); end (); @@ -1097,14 +1097,14 @@ static void window_close (Fl_Widget*, void* data) { octave_value_list args; - args(0) = static_cast<plot_window*> (data)->number (); + args(0) = static_cast<plot_window *> (data)->number (); octave::feval ("close", args); } // Button callbacks. static void button_callback (Fl_Widget* ww, void* data) { - static_cast<plot_window*> (data)->button_press (ww, data); + static_cast<plot_window *> (data)->button_press (ww, data); } void button_press (Fl_Widget* widg, void*)
--- a/libinterp/dldfcn/__osmesa_print__.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libinterp/dldfcn/__osmesa_print__.cc Thu Apr 27 10:04:31 2017 -0700 @@ -180,7 +180,7 @@ // Adapt code if this isn't always true assert (sizeof (GLubyte) == 1); uint8NDArray img (dv); - unsigned char *p = reinterpret_cast<unsigned char*>(img.fortran_vec ()); + unsigned char *p = reinterpret_cast<unsigned char *>(img.fortran_vec ()); memcpy (p, buffer, (4 * Width * Height)); Array<octave_idx_type> perm (dim_vector (3, 1));
--- a/libinterp/dldfcn/gzip.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libinterp/dldfcn/gzip.cc Thu Apr 27 10:04:31 2017 -0700 @@ -267,7 +267,7 @@ uchar_array (const std::string& str) { p = new Bytef[str.length () +1]; - std::strcpy (reinterpret_cast<char*> (p), str.c_str ()); + std::strcpy (reinterpret_cast<char *> (p), str.c_str ()); } uchar_array (const uchar_array&) = delete;
--- a/libinterp/octave-value/ov-java.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libinterp/octave-value/ov-java.cc Thu Apr 27 10:04:31 2017 -0700 @@ -1133,7 +1133,7 @@ return retval; } -#define TO_JAVA(obj) dynamic_cast<octave_java*> ((obj).internal_rep ()) +#define TO_JAVA(obj) dynamic_cast<octave_java *> ((obj).internal_rep ()) //! Return whether @c jobj shall be automatically converted to an Octave //! numeric value. @@ -1531,7 +1531,7 @@ { \ const OCTAVE_T ## NDArray v = val.METHOD_T ## array_value (); \ JAVA_T ## Array jarr = jni_env->New ## JAVA_T_CAP ## Array (v.numel ()); \ - const JAVA_T *jv = reinterpret_cast<const JAVA_T*> (v.data ()); \ + const JAVA_T *jv = reinterpret_cast<const JAVA_T *> (v.data ()); \ jni_env->Set ## JAVA_T_CAP ## ArrayRegion (jarr, 0, v.numel (), jv); \ jobj = reinterpret_cast<jobject> (jarr); \ jcls = jni_env->GetObjectClass (jobj); \
--- a/libinterp/parse-tree/bp-table.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/libinterp/parse-tree/bp-table.cc Thu Apr 27 10:04:31 2017 -0700 @@ -684,7 +684,7 @@ // or in the main function, which we check now. if (main_fcn->is_user_function ()) { - int e = dynamic_cast<octave_user_function*> (main_fcn)->ending_line (); + int e = dynamic_cast<octave_user_function *> (main_fcn)->ending_line (); if (e >= lineno && e < earliest_end) retval = main_fcn;
--- a/liboctave/system/oct-time.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/liboctave/system/oct-time.cc Thu Apr 27 10:04:31 2017 -0700 @@ -207,7 +207,7 @@ if (! p) return; - struct ::tm *t = static_cast<struct ::tm*> (p); + struct ::tm *t = static_cast<struct ::tm *> (p); m_sec = t->tm_sec; m_min = t->tm_min;
--- a/liboctave/util/lo-utils.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/liboctave/util/lo-utils.cc Thu Apr 27 10:04:31 2017 -0700 @@ -96,7 +96,7 @@ // FIXME: This leaks memory, but so would a call to setenv. // Short of extreme measures to track memory, altering the environment // always leaks memory, but the saving grace is that the leaks are small. - char *new_item = static_cast<char*> (std::malloc (new_len)); + char *new_item = static_cast<char *> (std::malloc (new_len)); sprintf (new_item, "%s=%s", name.c_str (), value.c_str ());
--- a/liboctave/util/oct-base64.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/liboctave/util/oct-base64.cc Thu Apr 27 10:04:31 2017 -0700 @@ -80,7 +80,7 @@ { octave_idx_type len = (outlen * sizeof (char)) / sizeof (double); retval.resize (dim_vector (1, len)); - double *dout = reinterpret_cast<double*> (out); + double *dout = reinterpret_cast<double *> (out); std::copy (dout, dout + len, retval.fortran_vec ()); ::free (out); }
--- a/liboctave/util/url-transfer.cc Thu Apr 27 09:48:57 2017 -0700 +++ b/liboctave/util/url-transfer.cc Thu Apr 27 10:04:31 2017 -0700 @@ -221,16 +221,16 @@ static int write_data (void *buffer, size_t size, size_t nmemb, void *streamp) { - std::ostream& stream = *(static_cast<std::ostream*> (streamp)); - stream.write (static_cast<const char*> (buffer), size*nmemb); + std::ostream& stream = *(static_cast<std::ostream *> (streamp)); + stream.write (static_cast<const char *> (buffer), size*nmemb); return (stream.fail () ? 0 : size * nmemb); } static int read_data (void *buffer, size_t size, size_t nmemb, void *streamp) { - std::istream& stream = *(static_cast<std::istream*> (streamp)); - stream.read (static_cast<char*> (buffer), size*nmemb); + std::istream& stream = *(static_cast<std::istream *> (streamp)); + stream.read (static_cast<char *> (buffer), size*nmemb); if (stream.eof ()) return stream.gcount (); else @@ -368,7 +368,7 @@ { std::ostream& retval = *curr_ostream; curr_ostream = &os; - SETOPTR (CURLOPT_WRITEDATA, static_cast<void*> (curr_ostream)); + SETOPTR (CURLOPT_WRITEDATA, static_cast<void *> (curr_ostream)); return retval; } @@ -376,7 +376,7 @@ { std::istream& retval = *curr_istream; curr_istream = &is; - SETOPTR (CURLOPT_READDATA, static_cast<void*> (curr_istream)); + SETOPTR (CURLOPT_READDATA, static_cast<void *> (curr_istream)); return retval; } @@ -489,7 +489,7 @@ std::ostringstream buf; url = "ftp://" + host_or_url + "/"; - SETOPTR (CURLOPT_WRITEDATA, static_cast<void*> (&buf)); + SETOPTR (CURLOPT_WRITEDATA, static_cast<void *> (&buf)); SETOPTR (CURLOPT_URL, url.c_str ()); SETOPTR (CURLOPT_DIRLISTONLY, 1); SETOPTR (CURLOPT_NOBODY, 0); @@ -500,7 +500,7 @@ SETOPTR (CURLOPT_NOBODY, 1); url = "ftp://" + host_or_url; - SETOPTR (CURLOPT_WRITEDATA, static_cast<void*> (curr_ostream)); + SETOPTR (CURLOPT_WRITEDATA, static_cast<void *> (curr_ostream)); SETOPTR (CURLOPT_DIRLISTONLY, 0); SETOPTR (CURLOPT_URL, url.c_str ()); @@ -691,13 +691,13 @@ SETOPT (CURLOPT_WRITEFUNCTION, write_data); // Set a pointer to our struct to pass to the callback. - SETOPT (CURLOPT_WRITEDATA, static_cast<void*> (&os)); + SETOPT (CURLOPT_WRITEDATA, static_cast<void *> (&os)); // Define our callback to get called when there's data to be read SETOPT (CURLOPT_READFUNCTION, read_data); // Set a pointer to our struct to pass to the callback. - SETOPT (CURLOPT_READDATA, static_cast<void*> (&is)); + SETOPT (CURLOPT_READDATA, static_cast<void *> (&is)); // Follow redirects. SETOPT (CURLOPT_FOLLOWLOCATION, true);