Skip to content

Commit 97afec4

Browse files
committed
Avoid shadowing "line"
Rename the first declaration to "source_line"
1 parent 5be52ba commit 97afec4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/goto-instrument/document_properties.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ void document_propertiest::get_code(
155155
dest="";
156156

157157
const irep_idt &file=source_location.get_file();
158-
const irep_idt &line=source_location.get_line();
158+
const irep_idt &source_line = source_location.get_line();
159159

160-
if(file=="" || line=="")
160+
if(file == "" || source_line == "")
161161
return;
162162

163163
std::ifstream in(id2string(file));
@@ -170,7 +170,7 @@ void document_propertiest::get_code(
170170
return;
171171
}
172172

173-
int line_int=unsafe_string2int(id2string(line));
173+
int line_int = unsafe_string2int(id2string(source_line));
174174

175175
int line_start=line_int-3,
176176
line_end=line_int+3;

0 commit comments

Comments
 (0)