diff liboctave/data-conv.cc @ 2800:9aeba8e006a4

[project @ 1997-03-09 09:50:20 by jwe]
author jwe
date Sun, 09 Mar 1997 09:50:39 +0000 (1997-03-09)
parents 8c09c04f7747
children 8b262e771614
line wrap: on
line diff
--- a/liboctave/data-conv.cc
+++ b/liboctave/data-conv.cc
@@ -109,7 +109,7 @@
       volatile TYPE *ptr = (TYPE *) data; \
       stream.read ((TYPE *) ptr, size * len); \
       if (swap) \
-        swap_ ## size ## _bytes ((char *) ptr, len); \
+        swap_ ## size ## _bytes (static_cast<char *> (ptr), len); \
       TYPE tmp = ptr[0]; \
       for (int i = len - 1; i > 0; i--) \
         data[i] = ptr[i]; \
@@ -123,7 +123,7 @@
 #define LS_DO_WRITE(TYPE,data,size,len,stream) \
   do \
     { \
-      char tmp_type = (char) type; \
+      char tmp_type = static_cast<char> (type); \
       stream.write (&tmp_type, 1); \
       TYPE *ptr = new TYPE [len]; \
       for (int i = 0; i < len; i++) \
@@ -161,7 +161,7 @@
 static void
 IEEE_big_double_to_IEEE_little_double (double *d, int len)
 {
-  swap_8_bytes ((char *) d, len);
+  swap_8_bytes (static_cast<char *> (d), len);
 }
 
 static void
@@ -185,7 +185,7 @@
 static void
 IEEE_big_float_to_IEEE_little_float (float *d, int len)
 {
-  swap_4_bytes ((char *) d, len);
+  swap_4_bytes (static_cast<char *> (d), len);
 }
 
 static void
@@ -209,7 +209,7 @@
 static void
 IEEE_little_double_to_IEEE_big_double (double *d, int len)
 {
-  swap_8_bytes ((char *) d, len);
+  swap_8_bytes (static_cast<char *> (d), len);
 }
 
 static void
@@ -233,7 +233,7 @@
 static void
 IEEE_little_float_to_IEEE_big_float (float *d, int len)
 {
-  swap_4_bytes ((char *) d, len);
+  swap_4_bytes (static_cast<char *> (d), len);
 }
 
 static void
@@ -634,9 +634,9 @@
 
     case LS_FLOAT:
       {
-	volatile float *ptr = (float *) data;
+	volatile float *ptr = static_cast<float *> (data);
 	is.read (data, 4 * len);
-	do_float_format_conversion ((float *) data, len, fmt);
+	do_float_format_conversion (static_cast<float *> (data), len, fmt);
 	float tmp = ptr[0];
 	for (int i = len - 1; i > 0; i--)
 	  data[i] = ptr[i];
@@ -690,7 +690,7 @@
 
     case LS_DOUBLE:
       {
-	char tmp_type = (char) type;
+	char tmp_type = static_cast<char> (type);
 	os.write (&tmp_type, 1);
 	os.write (data, 8 * len);
       }