# HG changeset patch # User John W. Eaton # Date 1444340481 14400 # Node ID 647db46ad754c61bfd363b4ea453e226378784cd # Parent 7374a3a6d5946c3c259c59f9dccc5558d291d08c eliminate more simple uses of error_state * audioread.cc: Eliminate simple uses of error_state. diff -r 7374a3a6d594 -r 647db46ad754 libinterp/dldfcn/audioread.cc --- a/libinterp/dldfcn/audioread.cc Thu Oct 08 17:26:40 2015 -0400 +++ b/libinterp/dldfcn/audioread.cc Thu Oct 08 17:41:21 2015 -0400 @@ -84,9 +84,6 @@ std::string filename = args(0).string_value (); - if (error_state) - return retval; - SF_INFO info; info.format = 0; SNDFILE *file = sf_open (filename.c_str (), SFM_READ, &info); @@ -112,9 +109,6 @@ { RowVector range = args(1).row_vector_value (); - if (error_state) - return retval; - if (range.numel () != 2) { error ("audioread: invalid specification for range of frames"); @@ -159,9 +153,6 @@ else type = args(1).string_value (); - if (error_state) - return retval; - if (type == "native") { switch (info.format & SF_FORMAT_SUBMASK) @@ -301,14 +292,8 @@ std::string filename = args(0).string_value (); - if (error_state) - return retval; - Matrix audio = args(1).matrix_value (); - if (error_state) - return retval; - double bias = 0.0; double scale = 1.0; @@ -326,9 +311,6 @@ int samplerate = args(2).int_value (); - if (error_state) - return retval; - std::string ext; size_t dotpos = filename.find_last_of ("."); if (dotpos != std::string::npos) @@ -498,9 +480,6 @@ std::string filename = args(0).string_value (); - if (error_state) - return retval; - SF_INFO info; info.format = 0; SNDFILE *file = sf_open (filename.c_str (), SFM_READ, &info);