Skip to content

Commit 02a6654

Browse files
committed
Revert "Adding multi-line option statements for config file"
This reverts commit 5d588e0.
1 parent 5d588e0 commit 02a6654

1 file changed

Lines changed: 2 additions & 25 deletions

File tree

Common/src/CConfig.cpp

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,7 +2834,6 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
28342834

28352835
int err_count = 0; // How many errors have we found in the config file
28362836
int max_err_count = 30; // Maximum number of errors to print before stopping
2837-
int line_count = 1;
28382837

28392838
map<string, bool> included_options;
28402839

@@ -2849,34 +2848,13 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
28492848
throw(1);
28502849
}
28512850

2852-
PrintingToolbox::trim(text_line);
2853-
2854-
2855-
/*--- Check if there is a line continuation character at the end of the current line.
2856-
* If yes, read until there is a line without one or a comment. If there is a statement after a cont. char
2857-
* throw an error. ---*/
2858-
2859-
while (text_line.back() == '\\'){
2860-
string tmp;
2861-
getline (case_file, tmp);
2862-
line_count++;
2863-
if (tmp.find_first_of('=') != string::npos){
2864-
errorString.append("Line " + to_string(line_count) + ": Statement found after continuation character.\n");
2865-
}
2866-
PrintingToolbox::trim(tmp);
2867-
if (tmp.front() != '%'){
2868-
text_line = PrintingToolbox::split(text_line, '\\')[0];
2869-
text_line += " " + tmp;
2870-
}
2871-
}
2872-
28732851
if (TokenizeString(text_line, option_name, option_value)) {
28742852

28752853
/*--- See if it's a python option ---*/
28762854

28772855
if (option_map.find(option_name) == option_map.end()) {
28782856
string newString;
2879-
newString.append("Line " + to_string(line_count) + " " + option_name);
2857+
newString.append(option_name);
28802858
newString.append(": invalid option name");
28812859
newString.append(". Check current SU2 options in config_template.cfg.");
28822860
newString.append("\n");
@@ -2892,7 +2870,7 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
28922870

28932871
if (included_options.find(option_name) != included_options.end()) {
28942872
string newString;
2895-
newString.append("Line " + to_string(line_count) + " " + option_name);
2873+
newString.append(option_name);
28962874
newString.append(": option appears twice");
28972875
newString.append("\n");
28982876
errorString.append(newString);
@@ -2915,7 +2893,6 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
29152893
err_count++;
29162894
}
29172895
}
2918-
line_count++;
29192896
}
29202897

29212898
/*--- See if there were any errors parsing the config file ---*/

0 commit comments

Comments
 (0)