Skip to content

Commit

Permalink
Fixup.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 22, 2017
1 parent 64da9be commit cbe25ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions source/dub/compilers/buildsettings.d
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,13 @@ struct BuildSettings {
private void addSI(ref string[] arr, in string[] vals)
{
bool[string] existing;
foreach (v; arr) {
auto p = Path(v);
auto s = p.length > 0 ? p.head.toString() : null;
existing[s] = true;
}
foreach (v; arr) existing[Path(v).head.toString()] = true;
foreach (v; vals) {
auto p = Path(v);
auto s = p.length > 0 ? p.head.toString() : null;
if (s !in existing)
auto s = Path(v).head.toString();
if (s !in existing) {
existing[s] = true;
arr ~= v;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/dub/recipe/packagerecipe.d
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ struct BuildSettingsTemplate {

void collectFiles(string method)(in string[][string] paths_map, string pattern)
{
auto files = appender!string;
auto files = appender!(string[]);

foreach (suffix, paths; paths_map) {
if (!platform.matchesSpecification(suffix))
Expand Down

0 comments on commit cbe25ea

Please sign in to comment.