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

stl-based names class replacement, re-enabled cab camera shake, enhanced parser comment support, minor bug fixes.

This commit is contained in:
tmj-fstate
2017-02-04 20:23:59 +01:00
parent 567c3a8a39
commit 589b6d5301
11 changed files with 237 additions and 74 deletions

View File

@@ -21,9 +21,9 @@ http://mozilla.org/MPL/2.0/.
// cParser -- generic class for parsing text data.
// constructors
cParser::cParser(std::string const Stream, buffertype Type, std::string Path, bool tr)
cParser::cParser( std::string const &Stream, buffertype const Type, std::string Path, bool const Loadtraction )
{
LoadTraction = tr;
LoadTraction = Loadtraction;
// build comments map
mComments.insert(commentmap::value_type("/*", "*/"));
mComments.insert(commentmap::value_type("//", "\n"));
@@ -236,3 +236,8 @@ int cParser::getProgress() const
{
return static_cast<int>( mStream->rdbuf()->pubseekoff(0, std::ios_base::cur) * 100 / mSize );
}
void cParser::addCommentStyle( std::string const &Commentstart, std::string const &Commentend ) {
mComments.insert( commentmap::value_type(Commentstart, Commentend) );
}