File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ std::unique_ptr<LHEEvent> LHEReader::readNextEvent() {
1616 std::string line;
1717 bool found_event_element = false ;
1818 while (getline (ifs_, line)) {
19+ auto back =
20+ std::find_if_not (line.rbegin (), line.rend (), [](unsigned char c) {
21+ return std::isspace (c);
22+ }).base ();
23+ line.erase (back, line.end ());
1924 if (line == " <event>" ) {
2025 found_event_element = true ;
2126 break ;
@@ -33,6 +38,11 @@ std::unique_ptr<LHEEvent> LHEReader::readNextEvent() {
3338 auto next_event = std::make_unique<LHEEvent>(line);
3439
3540 while (getline (ifs_, line)) {
41+ auto back =
42+ std::find_if_not (line.rbegin (), line.rend (), [](unsigned char c) {
43+ return std::isspace (c);
44+ }).base ();
45+ line.erase (back, line.end ());
3646 if (line == " </event>" || line == " <mgrwt>" ) {
3747 // break if the event ended or in LHE 3.0 if we reach the mgrwt block
3848 break ;
You can’t perform that action at this time.
0 commit comments