WSL/SLF GitLab Repository

Commit 091545f8 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Small cleanup to please the Intel compiler on Cray

parent b663cf6b
......@@ -657,10 +657,11 @@ double unitsPrefix(const char& prefix)
case 'G' : return 1e9;
case 'T' : return 1e12;
case 'P' : return 1e15;
default: {
const std::string prefix_str( 1, prefix );
throw InvalidArgumentException("Invalid unit prefix '"+prefix_str+"'", AT);
}
}
const std::string prefix_str( 1, prefix );
throw IOException("Invalid unit prefix '"+prefix_str+"'", AT);
}
//currently, only the most simple ase of units are handled. Composite units
......
......@@ -156,6 +156,8 @@ void Coords::moveByBearing(const double& i_bearing, const double& i_distance) {
case GEO_VINCENTY:
CoordsAlgorithms::VincentyInverse(latitude, longitude, i_distance, i_bearing, new_lat, new_lon);
break;
default:
throw InvalidArgumentException("Unsupported distance algorithm", AT);
}
setLatLon(new_lat, new_lon, altitude, true);
......@@ -854,6 +856,8 @@ void Coords::distance(const Coords& destination, double& o_distance, double& o_b
case GEO_VINCENTY:
o_distance = CoordsAlgorithms::VincentyDistance(latitude, longitude, destination.getLat(), destination.getLon(), o_bearing);
break;
default:
throw InvalidArgumentException("Unsupported distance algorithm", AT);
}
}
}
......@@ -882,6 +886,8 @@ void Coords::WGS84_to_local(double lat_in, double long_in, double& east_out, dou
case GEO_VINCENTY:
dist = CoordsAlgorithms::VincentyDistance(ref_latitude, ref_longitude, lat_in, long_in, alpha);
break;
default:
throw InvalidArgumentException("Unsupported distance algorithm", AT);
}
east_out = dist*sin(alpha*Cst::to_rad);
......@@ -913,6 +919,8 @@ void Coords::local_to_WGS84(double east_in, double north_in, double& lat_out, do
case GEO_VINCENTY:
CoordsAlgorithms::VincentyInverse(ref_latitude, ref_longitude, dist, bearing, lat_out, long_out);
break;
default:
throw InvalidArgumentException("Unsupported distance algorithm", AT);
}
}
}
......
......@@ -1061,8 +1061,10 @@ double Date::parseTimeZone(const std::string& timezone_iso)
else
return IOUtils::nodata;
}
default: {
return IOUtils::nodata;
}
}
return IOUtils::nodata;
} else {
return IOUtils::nodata;
}
......@@ -1184,6 +1186,8 @@ const string Date::toString(const FORMATS& type, const bool& gmt) const
<< setw(2) << setfill('0') << getDayOfWeek(gmt);
break;
}
default:
throw InvalidFormatException("Unsupported time format", AT);
}
return tmpstr.str();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment