Only generate line directive when necessary
This commit is contained in:
parent
a2929c0020
commit
0723bea947
1 changed files with 5 additions and 2 deletions
|
|
@ -198,8 +198,11 @@ namespace
|
|||
|
||||
void set_line(unsigned line)
|
||||
{
|
||||
*result_ += "#line " + std::to_string(line) + "\n";
|
||||
cur_line_ = line;
|
||||
if (cur_line_ != line)
|
||||
{
|
||||
*result_ += "#line " + std::to_string(line) + "\n";
|
||||
cur_line_ = line;
|
||||
}
|
||||
}
|
||||
|
||||
void write_str(std::string str)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue