comparison libinterp/corefcn/debug.cc @ 19777:67f2c76f9f4d

Remove unnecessary checking of error_state after is_string validation. * data.cc (#NATIVE_REDUCTION, Fcumsum, Fprod, Fsum): Remove if (error_state) check. * debug.cc (Fdbstep): Remove if (error_state) check. * dlmread.cc (Fdlmread): Remove if (error_state) check. * graphics.cc (Fwaitfor): Remove if (error_state) check. * lu.cc (Flu): Remove if (error_state) check. * utils.cc (Ferrno): Remove if (error_state) check. * variables.cc (is_valid_function): Remove if (error_state) check. * fftw.cc (Ffftw): Remove if (error_state) check.
author Rik <rik@octave.org>
date Tue, 17 Feb 2015 17:34:48 -0800
parents 4197fc428c7d
children a59c5a16c9ab
comparison
equal deleted inserted replaced
19776:55a4173f1624 19777:67f2c76f9f4d
1430 { 1430 {
1431 if (args(0).is_string ()) 1431 if (args(0).is_string ())
1432 { 1432 {
1433 std::string arg = args(0).string_value (); 1433 std::string arg = args(0).string_value ();
1434 1434
1435 if (! error_state) 1435 if (arg == "in")
1436 { 1436 {
1437 if (arg == "in") 1437 Vdebugging = false;
1438
1439 tree_evaluator::dbstep_flag = -1;
1440 }
1441 else if (arg == "out")
1442 {
1443 Vdebugging = false;
1444
1445 tree_evaluator::dbstep_flag = -2;
1446 }
1447 else
1448 {
1449 int n = atoi (arg.c_str ());
1450
1451 if (n > 0)
1438 { 1452 {
1439 Vdebugging = false; 1453 Vdebugging = false;
1440 1454
1441 tree_evaluator::dbstep_flag = -1; 1455 tree_evaluator::dbstep_flag = n;
1442 }
1443 else if (arg == "out")
1444 {
1445 Vdebugging = false;
1446
1447 tree_evaluator::dbstep_flag = -2;
1448 } 1456 }
1449 else 1457 else
1450 { 1458 error ("dbstep: invalid argument");
1451 int n = atoi (arg.c_str ());
1452
1453 if (n > 0)
1454 {
1455 Vdebugging = false;
1456
1457 tree_evaluator::dbstep_flag = n;
1458 }
1459 else
1460 error ("dbstep: invalid argument");
1461 }
1462 } 1459 }
1463 } 1460 }
1464 else 1461 else
1465 error ("dbstep: input argument must be a string"); 1462 error ("dbstep: input argument must be a string");
1466 } 1463 }