summaryrefslogtreecommitdiff
path: root/cpp/src/slice2rb/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2rb/Main.cpp')
-rw-r--r--cpp/src/slice2rb/Main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp
index ebe351d75f2..ae41372844b 100644
--- a/cpp/src/slice2rb/Main.cpp
+++ b/cpp/src/slice2rb/Main.cpp
@@ -181,6 +181,15 @@ compile(int argc, char* argv[])
for(i = args.begin(); i != args.end(); ++i)
{
+ //
+ // Ignore duplicates.
+ //
+ vector<string>::iterator p = find(args.begin(), args.end(), *i);
+ if(p != i)
+ {
+ continue;
+ }
+
if(depend)
{
PreprocessorPtr icecpp = Preprocessor::create(argv[0], *i, cppArgs);