diff src/ov-fcn-handle.cc @ 5760:8d7162924bd3

[project @ 2006-04-14 04:01:37 by jwe]
author jwe
date Fri, 14 Apr 2006 04:01:40 +0000
parents 775e065f7dc4
children 7ba9ad1fec11
line wrap: on
line diff
--- a/src/ov-fcn-handle.cc	Thu Apr 13 13:04:33 2006 +0000
+++ b/src/ov-fcn-handle.cc	Fri Apr 14 04:01:40 2006 +0000
@@ -218,7 +218,7 @@
 octave_fcn_handle::save_binary (std::ostream& os, bool&)
 {
   FOUR_BYTE_INT tmp = nm.length ();
-  os.write (X_CAST (char *, &tmp), 4);
+  os.write (reinterpret_cast<char *> (&tmp), 4);
   os.write (nm.c_str (), nm.length ());
   if (nm == "@<anonymous>")
     {
@@ -227,7 +227,7 @@
       std::string stmp = OSSTREAM_STR (buf);
       OSSTREAM_FREEZE (buf);
       tmp = stmp.length ();
-      os.write (X_CAST (char *, &tmp), 4);
+      os.write (reinterpret_cast<char *> (&tmp), 4);
       os.write (stmp.c_str (), stmp.length ());
     }
   return true;
@@ -238,7 +238,7 @@
 				oct_mach_info::float_format)
 {
   FOUR_BYTE_INT tmp;
-  if (! is.read (X_CAST (char *, &tmp), 4))
+  if (! is.read (reinterpret_cast<char *> (&tmp), 4))
     return false;
   if (swap)
     swap_bytes<4> (&tmp);
@@ -252,7 +252,7 @@
 
   if (nm == "@<anonymous>")
     {
-      if (! is.read (X_CAST (char *, &tmp), 4))
+      if (! is.read (reinterpret_cast<char *> (&tmp), 4))
 	return false;
       if (swap)
 	swap_bytes<4> (&tmp);
@@ -307,7 +307,7 @@
   OCTAVE_LOCAL_BUFFER (hsize_t, hdims, 2);
   hdims[0] = 0;
   hdims[1] = 0;
-  space_hid = H5Screate_simple (0 , hdims, (hsize_t*) 0);
+  space_hid = H5Screate_simple (0 , hdims, 0);
   if (space_hid < 0)
     {
       H5Tclose (type_hid);
@@ -317,8 +317,7 @@
 
   data_hid = H5Dcreate (group_hid, "nm",  type_hid, space_hid, H5P_DEFAULT);
   if (data_hid < 0 || H5Dwrite (data_hid, type_hid, H5S_ALL, H5S_ALL,
-				H5P_DEFAULT,
-				X_CAST (void *, nm.c_str ())) < 0)
+				H5P_DEFAULT, nm.c_str ()) < 0)
     {
       H5Sclose (space_hid);
       H5Tclose (type_hid);
@@ -345,8 +344,7 @@
       data_hid = H5Dcreate (group_hid, "fcn",  type_hid, space_hid,
 			    H5P_DEFAULT);
       if (data_hid < 0 || H5Dwrite (data_hid, type_hid, H5S_ALL, H5S_ALL,
-				    H5P_DEFAULT,
-				    X_CAST (void *, stmp.c_str ())) < 0)
+				    H5P_DEFAULT, stmp.c_str ()) < 0)
 	{
 	  H5Sclose (space_hid);
 	  H5Tclose (type_hid);
@@ -422,8 +420,7 @@
   st_id = H5Tcopy (H5T_C_S1);
   H5Tset_size (st_id, slen);
 
-  if (H5Dread (data_hid, st_id, H5S_ALL, H5S_ALL, H5P_DEFAULT,
-	       X_CAST (void *, nm_tmp)) < 0)
+  if (H5Dread (data_hid, st_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, nm_tmp) < 0)
     {
       H5Sclose (space_hid);
       H5Tclose (type_hid);
@@ -483,8 +480,7 @@
       st_id = H5Tcopy (H5T_C_S1);
       H5Tset_size (st_id, slen);
 
-      if (H5Dread (data_hid, st_id, H5S_ALL, H5S_ALL, H5P_DEFAULT,
-		   X_CAST (void *, fcn_tmp)) < 0)
+      if (H5Dread (data_hid, st_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, fcn_tmp) < 0)
 	{
 	  H5Sclose (space_hid);
 	  H5Tclose (type_hid);