summaryrefslogtreecommitdiff
path: root/cpp/src/slice2php/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2php/Main.cpp')
-rw-r--r--cpp/src/slice2php/Main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp
index 19fbd3d98fa..d66a791af51 100644
--- a/cpp/src/slice2php/Main.cpp
+++ b/cpp/src/slice2php/Main.cpp
@@ -1625,6 +1625,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);