diff libinterp/dldfcn/colamd.cc @ 20614:10ec79b47808

use new string_value method to handle value extraction errors * __voronoi__.cc, chol.cc, colamd.cc, fftw.cc: Use new string_value method.
author John W. Eaton <jwe@octave.org>
date Thu, 08 Oct 2015 18:15:56 -0400
parents a9574e3c6e9e
children
line wrap: on
line diff
--- a/libinterp/dldfcn/colamd.cc	Thu Oct 08 17:41:21 2015 -0400
+++ b/libinterp/dldfcn/colamd.cc	Thu Oct 08 18:15:56 2015 -0400
@@ -705,17 +705,9 @@
 
       if (nargin == 2)
         {
-          if (args(1).is_string ())
-            {
-              std::string str = args(1).string_value ();
-              if (str.find ("C") == 0 || str.find ("c") == 0)
-                is_sym = false;
-            }
-          else
-            {
-              error ("etree: TYP must be a string");
-              return retval;
-            }
+          std::string str = args(1).string_value ("etree: TYP must be a string");
+          if (str.find ("C") == 0 || str.find ("c") == 0)
+            is_sym = false;
         }
 
       // column elimination tree post-ordering (reuse variables)