Skip to content

Commit

Permalink
prefer MDAL::split() char variant where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros committed Feb 20, 2025
1 parent 0382ca7 commit ae9ef1a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mdal/frmts/mdal_hec2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static MDAL::DateTime convertToDateTime( const std::string strDateTime )
{
//HECRAS format date is 01JAN2000

auto data = MDAL::split( strDateTime, " " );
auto data = MDAL::split( strDateTime, ' ' );
if ( data.size() < 2 )
return MDAL::DateTime();

Expand Down
4 changes: 2 additions & 2 deletions mdal/frmts/mdal_ugrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ void MDAL::DriverUgrid::ignore1DMeshVariables( const std::string &mesh, std::set
for ( const std::string &coordinateIt : coordinateVarsToIgnore )
{
std::string coordinatesVar = mNcFile->getAttrStr( mesh, coordinateIt );
std::vector<std::string> allCoords = MDAL::split( coordinatesVar, " " );
std::vector<std::string> allCoords = MDAL::split( coordinatesVar, ' ' );

for ( const std::string &var : allCoords )
{
Expand Down Expand Up @@ -1041,7 +1041,7 @@ void MDAL::DriverUgrid::writeVariables( MDAL::Mesh *mesh, const std::string &mes
}
else
{
std::vector<std::string> words = MDAL::split( mesh->crs(), ":" );
std::vector<std::string> words = MDAL::split( mesh->crs(), ':' );

if ( words[0] == "EPSG" && words.size() > 1 )
{
Expand Down
2 changes: 1 addition & 1 deletion mdal/frmts/mdal_xdmf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void MDAL::DriverXdmf::hdf5NamePath( const std::string &dataItemPath, std::strin
path.erase( 0, startpos );
}

std::vector<std::string> chunks = MDAL::split( path, ":" );
std::vector<std::string> chunks = MDAL::split( path, ':' );
if ( chunks.size() != 2 )
{
throw MDAL::Error( MDAL_Status::Err_UnknownFormat, "must be in format fileName:hdfPath" );
Expand Down
2 changes: 1 addition & 1 deletion mdal/mdal_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ MDAL::DateTime MDAL::parseCFReferenceTime( const std::string &timeInformation, c
if ( strings.size() > 3 )
{
std::string timeString = strings[3];
auto timeStringsValue = MDAL::split( timeString, ":" );
auto timeStringsValue = MDAL::split( timeString, ':' );
if ( timeStringsValue.size() == 3 )
{
hours = MDAL::toInt( timeStringsValue[0] );
Expand Down

0 comments on commit ae9ef1a

Please sign in to comment.