simplifications

This commit is contained in:
conrad
2021-07-07 12:30:34 +10:00
parent 5bc4f7b321
commit 40c0f346bd
+11 -15
View File
@@ -1663,26 +1663,22 @@ diskio::load_csv_ascii(Mat<eT>& x, std::istream& f, std::string& err_msg, const
field<std::string> token_array;
bool token_array_ok = true;
bool token_array_ok = false;
if(use_mp)
{
#if defined(ARMA_USE_OPENMP)
try
{
try
{
token_array.set_size(f_n_cols);
for(uword i=0; i < f_n_cols; ++i) { token_array(i).reserve(32); }
}
catch(...)
{
token_array_ok = false;
token_array.reset();
}
token_array.set_size(f_n_cols);
for(uword i=0; i < f_n_cols; ++i) { token_array(i).reserve(32); }
token_array_ok = true;
}
catch(...)
{
token_array.reset();
}
#endif
}
if(use_mp && token_array_ok)