16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 03:09:18 +02:00

build 180531. configurable cooling fans rotation rate, additional reverser position command, minor bug fixes

This commit is contained in:
tmj-fstate
2018-05-31 20:23:15 +02:00
parent 94f923ebb8
commit 1fa2f201f2
13 changed files with 42 additions and 17 deletions

View File

@@ -377,3 +377,13 @@ replace_slashes( std::string &Filename ) {
std::begin( Filename ), std::end( Filename ),
'\\', '/' );
}
// returns potential path part from provided file name
std::string
substr_path( std::string const &Filename ) {
return (
Filename.rfind( '/' ) != std::string::npos ?
Filename.substr( 0, Filename.rfind( '/' ) + 1 ) :
"" );
}