Skip to content

Commit 739870b

Browse files
committed
Remove extra empty comment line generation.
1 parent 230933f commit 739870b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/parser/dbclineparser.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,12 @@ bool DbcLineParser::ParseCommentLine(Comment_t* cm, const std::string& line)
468468
cm->Text = items[1];
469469
}
470470

471+
if (cm->Text.size() > 0 && cm->Text.back() == '\n')
472+
{
473+
// remove last '\n' symbol in the string end
474+
cm->Text.pop_back();
475+
}
476+
471477
ret = true;
472478
}
473479

test/gencode/lib/testdb.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ typedef struct
5858
uint32_t U28_TEST_1; // Bits=28
5959

6060
// This is test signal for Value Table
61-
//
6261
// 3 : "Unsupported"
6362
// 2 : "Fail"
6463
// 1 : "OK"
@@ -78,7 +77,6 @@ typedef struct
7877
uint32_t U28_TEST_1; // Bits=28
7978

8079
// This is test signal for Value Table
81-
//
8280
// 3 : "Unsupported"
8381
// 2 : "Fail"
8482
// 1 : "OK"
@@ -546,7 +544,6 @@ typedef struct
546544
#ifdef TESTDB_USE_BITS_SIGNAL
547545

548546
// This is test signal for Value Table
549-
//
550547
// 3 : "Unsupported"
551548
// 2 : "Fail"
552549
// 1 : "OK"
@@ -559,7 +556,6 @@ typedef struct
559556
#else
560557

561558
// This is test signal for Value Table
562-
//
563559
// 3 : "Unsupported"
564560
// 2 : "Fail"
565561
// 1 : "OK"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy