build 200728. basic train passenger information system, event condition diagnostics enhancement, ai door control logic fix

This commit is contained in:
tmj-fstate
2020-07-29 03:29:02 +02:00
parent 138b793f5a
commit e74a614385
15 changed files with 341 additions and 68 deletions

View File

@@ -459,6 +459,14 @@ len_common_prefix( std::string const &Left, std::string const &Right ) {
std::distance( left, std::mismatch( left, left + Left.size(), right ).first ) );
}
// returns true if provided string ends with another provided string
bool
ends_with( std::string const &String, std::string const &Suffix ) {
return ( String.size() >= Suffix.size() )
&& ( 0 == String.compare( String.size() - Suffix.size(), Suffix.size(), Suffix ) );
}
// helper, restores content of a 3d vector from provided input stream
// TODO: review and clean up the helper routines, there's likely some redundant ones
glm::dvec3 LoadPoint( cParser &Input ) {