]> git.tdb.fi Git - builder.git/blobdiff - source/androidassetpackagingtool.cpp
Replace some sets with vectors as well
[builder.git] / source / androidassetpackagingtool.cpp
index 3d867472d6c2699302623d5edac52df6559642fc..af8bc95ea422187112d5dce75927d8567803d309 100644 (file)
@@ -1,3 +1,4 @@
+#include <msp/core/algorithm.h>
 #include <msp/fs/utils.h>
 #include "androidassetpackagingtool.h"
 #include "androidmanifestfile.h"
@@ -77,17 +78,17 @@ Task *AndroidAssetPackagingTool::run(const Target &tgt) const
                else if(real->get_package()==res.get_package())
                {
                        const FS::Path &path = file->get_path();
-                       resource_dirs.push_back(path.subpath(0, path.size()-2));
+                       FS::Path res_dir = path.subpath(0, path.size()-2);
+                       if(!any_equals(resource_dirs, res_dir))
+                               resource_dirs.push_back(res_dir);
                }
        }
 
-       set<string> seen_dirs;
        for(const FS::Path &d: resource_dirs)
-               if(seen_dirs.insert(d.str()).second)
-               {
-                       argv.push_back("-S");
-                       argv.push_back(FS::relative(d, work_dir).str());
-               }
+       {
+               argv.push_back("-S");
+               argv.push_back(FS::relative(d, work_dir).str());
+       }
 
        return new ExternalTask(argv, work_dir);
 }