diff liboctave/util/url-transfer.cc @ 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.
author Rik <rik@octave.org>
date Thu, 27 Apr 2017 10:04:31 -0700
parents 092078913d54
children 21baad6b35c4
line wrap: on
line diff
--- 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);