mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 14:49:19 +02:00
build 210303. vehicle control hint system, virtual trainman toggle, configurable diesel engine rpm deceleration rate, vehicle repair enhancement, debug panel enhancements, customizable vehicle displays refresh rate, idling compressor sound, traction ac motor sound, braking sound enhancement, sky state enhancement, minor bug fixes
This commit is contained in:
@@ -461,12 +461,20 @@ len_common_prefix( std::string const &Left, std::string const &Right ) {
|
||||
|
||||
// returns true if provided string ends with another provided string
|
||||
bool
|
||||
ends_with( std::string const &String, std::string const &Suffix ) {
|
||||
ends_with( std::string_view String, std::string_view Suffix ) {
|
||||
|
||||
return ( String.size() >= Suffix.size() )
|
||||
&& ( 0 == String.compare( String.size() - Suffix.size(), Suffix.size(), Suffix ) );
|
||||
}
|
||||
|
||||
// returns true if provided string begins with another provided string
|
||||
bool
|
||||
starts_with( std::string_view const String, std::string_view Prefix ) {
|
||||
|
||||
return ( String.size() >= Prefix.size() )
|
||||
&& ( 0 == String.compare( 0, Prefix.size(), Prefix ) );
|
||||
}
|
||||
|
||||
// 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 ) {
|
||||
|
||||
Reference in New Issue
Block a user