mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 15:09:19 +02:00
Random includes
This commit is contained in:
@@ -245,7 +245,7 @@ std::string cParser::readToken( bool ToLower, const char *Break ) {
|
|||||||
// launch child parser if include directive found.
|
// launch child parser if include directive found.
|
||||||
// NOTE: parameter collecting uses default set of token separators.
|
// NOTE: parameter collecting uses default set of token separators.
|
||||||
if( expandIncludes && token == "include" ) {
|
if( expandIncludes && token == "include" ) {
|
||||||
std::string includefile = readToken(ToLower); // nazwa pliku
|
std::string includefile = deserialize_random_set(*this); //readToken(ToLower); // nazwa pliku
|
||||||
replace_slashes(includefile);
|
replace_slashes(includefile);
|
||||||
if( ( true == LoadTraction )
|
if( ( true == LoadTraction )
|
||||||
|| ( ( false == contains( includefile, "tr/" ) )
|
|| ( ( false == contains( includefile, "tr/" ) )
|
||||||
@@ -268,7 +268,7 @@ std::string cParser::readToken( bool ToLower, const char *Break ) {
|
|||||||
else if( ( std::strcmp( Break, "\n\r" ) == 0 ) && ( token.compare( 0, 7, "include" ) == 0 ) ) {
|
else if( ( std::strcmp( Break, "\n\r" ) == 0 ) && ( token.compare( 0, 7, "include" ) == 0 ) ) {
|
||||||
// HACK: if the parser reads full lines we expect this line to contain entire include directive, to make parsing easier
|
// HACK: if the parser reads full lines we expect this line to contain entire include directive, to make parsing easier
|
||||||
cParser includeparser( token.substr( 7 ) );
|
cParser includeparser( token.substr( 7 ) );
|
||||||
std::string includefile = includeparser.readToken( ToLower ); // nazwa pliku
|
std::string includefile = deserialize_random_set(includeparser);//includeparser.readToken( ToLower ); // nazwa pliku
|
||||||
replace_slashes(includefile);
|
replace_slashes(includefile);
|
||||||
if( ( true == LoadTraction )
|
if( ( true == LoadTraction )
|
||||||
|| ( ( false == contains( includefile, "tr/" ) )
|
|| ( ( false == contains( includefile, "tr/" ) )
|
||||||
|
|||||||
Reference in New Issue
Block a user