16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 14:49:19 +02:00

Merge branch 'tmj-dev' into milek-dev

This commit is contained in:
milek7
2018-06-15 18:58:03 +02:00
54 changed files with 2310 additions and 927 deletions

View File

@@ -179,6 +179,8 @@ extract_value( bool &Variable, std::string const &Key, std::string const &Input,
bool FileExists( std::string const &Filename );
std::pair<std::string, std::string> FileExists( std::vector<std::string> const &Names, std::vector<std::string> const &Extensions );
// returns time of last modification for specified file
std::time_t last_modified( std::string const &Filename );
@@ -190,6 +192,9 @@ erase_extension( std::string &Filename );
void
replace_slashes( std::string &Filename );
// returns potential path part from provided file name
std::string substr_path( std::string const &Filename );
template <typename Type_>
void SafeDelete( Type_ &Pointer ) {
delete Pointer;
@@ -227,6 +232,8 @@ template <typename Type_>
Type_
min_speed( Type_ const Left, Type_ const Right ) {
if( Left == Right ) { return Left; }
return std::min(
( Left != -1 ?
Left :