Skip to content

Commit 1d4e388

Browse files
author
Enrico Steffinlongo
committed
Fixed issue with string concatenation
C++17 support for [[nodiscard]] raised a case of usage of string concatenation (+ operator) discarding the result, causing an error. This commit changes the + operator with a +=.
1 parent 5088345 commit 1d4e388

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/goto-instrument/document_properties.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ document_propertiest::get_code(const source_locationt &source_location)
238238
while(line_no.size()<4)
239239
line_no=" "+line_no;
240240

241-
line_no+" ";
241+
line_no+=" ";
242242

243243
tmp+=escape_latex(it->text, true);
244244

@@ -251,7 +251,7 @@ document_propertiest::get_code(const source_locationt &source_location)
251251
while(line_no.size()<4)
252252
line_no="&nbsp;"+line_no;
253253

254-
line_no+"&nbsp;&nbsp;";
254+
line_no+="&nbsp;&nbsp;";
255255

256256
tmp+=escape_html(it->text);
257257

0 commit comments

Comments
 (0)