From ae9ef1afa39b5b1ebe6b88908eee6324d11c240c Mon Sep 17 00:00:00 2001 From: uclaros Date: Thu, 20 Feb 2025 13:05:51 +0200 Subject: [PATCH] prefer MDAL::split() char variant where possible --- mdal/frmts/mdal_hec2d.cpp | 2 +- mdal/frmts/mdal_ugrid.cpp | 4 ++-- mdal/frmts/mdal_xdmf.cpp | 2 +- mdal/mdal_utils.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mdal/frmts/mdal_hec2d.cpp b/mdal/frmts/mdal_hec2d.cpp index dfcd29e7..eabe21d4 100644 --- a/mdal/frmts/mdal_hec2d.cpp +++ b/mdal/frmts/mdal_hec2d.cpp @@ -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(); diff --git a/mdal/frmts/mdal_ugrid.cpp b/mdal/frmts/mdal_ugrid.cpp index d4a2c7e5..616049dc 100644 --- a/mdal/frmts/mdal_ugrid.cpp +++ b/mdal/frmts/mdal_ugrid.cpp @@ -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 allCoords = MDAL::split( coordinatesVar, " " ); + std::vector allCoords = MDAL::split( coordinatesVar, ' ' ); for ( const std::string &var : allCoords ) { @@ -1041,7 +1041,7 @@ void MDAL::DriverUgrid::writeVariables( MDAL::Mesh *mesh, const std::string &mes } else { - std::vector words = MDAL::split( mesh->crs(), ":" ); + std::vector words = MDAL::split( mesh->crs(), ':' ); if ( words[0] == "EPSG" && words.size() > 1 ) { diff --git a/mdal/frmts/mdal_xdmf.cpp b/mdal/frmts/mdal_xdmf.cpp index 3432b028..56885d28 100644 --- a/mdal/frmts/mdal_xdmf.cpp +++ b/mdal/frmts/mdal_xdmf.cpp @@ -359,7 +359,7 @@ void MDAL::DriverXdmf::hdf5NamePath( const std::string &dataItemPath, std::strin path.erase( 0, startpos ); } - std::vector chunks = MDAL::split( path, ":" ); + std::vector chunks = MDAL::split( path, ':' ); if ( chunks.size() != 2 ) { throw MDAL::Error( MDAL_Status::Err_UnknownFormat, "must be in format fileName:hdfPath" ); diff --git a/mdal/mdal_utils.cpp b/mdal/mdal_utils.cpp index b9ee0482..ff46ffa3 100644 --- a/mdal/mdal_utils.cpp +++ b/mdal/mdal_utils.cpp @@ -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] );