diff src/bitfcns.cc @ 4952:bfd57b466752

[project @ 2004-09-01 00:49:05 by jwe]
author jwe
date Wed, 01 Sep 2004 00:49:06 +0000
parents b22a7a1db0d5
children b6ff3a0d3d17
line wrap: on
line diff
--- a/src/bitfcns.cc
+++ b/src/bitfcns.cc
@@ -86,23 +86,15 @@
  \
   if (nargin == 2) \
     { \
-      if (args(0).type_id () == octave_matrix::static_type_id () \
-	  || args(0).type_id () == octave_scalar::static_type_id () \
-	  || args(1).type_id () == octave_matrix::static_type_id () \
-	  || args(1).type_id () == octave_scalar::static_type_id ()) \
+      if ((args(0).class_name () == octave_scalar::static_class_name ()) \
+	  || (args(1).class_name () == octave_scalar::static_class_name ())) \
 	{ \
-	  bool arg0_is_int = true; \
-	  bool arg1_is_int = true; \
- \
-	  if (args(0).type_id () == octave_matrix::static_type_id () \
-	      || args(0).type_id () == octave_scalar::static_type_id ()) \
-	    arg0_is_int = false; \
- \
-	  if (args(1).type_id () == octave_matrix::static_type_id () \
-	      || args(1).type_id () == octave_scalar::static_type_id ()) \
-	    arg1_is_int = false; \
- \
-	  if (!arg0_is_int && !arg1_is_int) \
+	  bool arg0_is_int = (args(0).class_name () !=	\
+			      octave_scalar::static_class_name ()); \
+	  bool arg1_is_int = (args(1).class_name () !=	\
+			      octave_scalar::static_class_name ()); \
+	  \
+	  if (! (arg0_is_int || arg1_is_int))	\
 	    { \
 	      uint64NDArray x (args(0).array_value ()); \
 	      uint64NDArray y (args(1).array_value ());	\
@@ -185,7 +177,7 @@
 		error ("%s: invalid operand type", FNAME); \
 	    } \
 	} \
-      else if (args(0).type_id () == args(1).type_id ()) \
+      else if (args(0).class_name () == args(1).class_name ()) \
 	{ \
 	  if (args(0).type_id () == octave_uint64_matrix::static_type_id () \
 	      || args(0).type_id () == octave_uint64_scalar::static_type_id ()) \