Skip to content

Commit 1fc57a6

Browse files
committed
Move goto_cc_cmdlinet::have_infile_arg to .cpp
Putting implementations in `.cpp` files is the best-practise because it reduces compile times.
1 parent 00bdff1 commit 1fc57a6

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/goto-cc/goto_cc_cmdline.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,13 @@ void goto_cc_cmdlinet::add_infile_arg(const std::string &arg)
134134
fclose(tmp);
135135
}
136136
}
137+
138+
bool goto_cc_cmdlinet::have_infile_arg() const
139+
{
140+
for(parsed_argvt::const_iterator it = parsed_argv.begin();
141+
it != parsed_argv.end();
142+
it++)
143+
if(it->is_infile_name)
144+
return true;
145+
return false;
146+
}

src/goto-cc/goto_cc_cmdline.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,7 @@ class goto_cc_cmdlinet:public cmdlinet
6868
typedef std::list<argt> parsed_argvt;
6969
parsed_argvt parsed_argv;
7070

71-
bool have_infile_arg() const
72-
{
73-
for(parsed_argvt::const_iterator
74-
it=parsed_argv.begin(); it!=parsed_argv.end(); it++)
75-
if(it->is_infile_name)
76-
return true;
77-
return false;
78-
}
71+
bool have_infile_arg() const;
7972

8073
std::string stdin_file;
8174

0 commit comments

Comments
 (0)