Skip to content

Commit 098351a

Browse files
committed
Move goto_cc_cmdlinet::have_infile_arg to .cpp
So that it can be refactored to use a standard algorithm without adding extra includes to the header file.
1 parent 6c734f9 commit 098351a

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
@@ -117,3 +117,13 @@ void goto_cc_cmdlinet::add_infile_arg(const std::string &arg)
117117
fclose(tmp);
118118
}
119119
}
120+
121+
bool goto_cc_cmdlinet::have_infile_arg() const
122+
{
123+
for(parsed_argvt::const_iterator it = parsed_argv.begin();
124+
it != parsed_argv.end();
125+
it++)
126+
if(it->is_infile_name)
127+
return true;
128+
return false;
129+
}

src/goto-cc/goto_cc_cmdline.h

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

66-
bool have_infile_arg() const
67-
{
68-
for(parsed_argvt::const_iterator
69-
it=parsed_argv.begin(); it!=parsed_argv.end(); it++)
70-
if(it->is_infile_name)
71-
return true;
72-
return false;
73-
}
66+
bool have_infile_arg() const;
7467

7568
std::string stdin_file;
7669

0 commit comments

Comments
 (0)