Skip to content

Commit

Permalink
remove static foreach
Browse files Browse the repository at this point in the history
  • Loading branch information
Szabo Bogdan committed Jan 13, 2018
1 parent e775ab0 commit 194cc39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions runner/trial/description.d
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,7 @@ class PackageDescriptionCommand : PackageBuildCommand {
throw new Exception("The Json from `" ~ path ~ "` is invalid.");
}

static if(__traits(compiles, validateJson!Settings(Json.emptyObject))) {
validateJson!Settings(jsonSettings,"", " in `" ~ path ~ "`");
}
validateJson!Settings(jsonSettings,"", " in `" ~ path ~ "`");

Settings settings = readText(path).deserializeJson!Settings;

Expand Down
2 changes: 1 addition & 1 deletion runner/trial/jsonvalidation.d
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void validateJson(T)(const Json data, const string prefix = "", const string pos
static if (isAggregateType!T) {
string[] members;

static foreach (memberName; __traits(allMembers, T)) {
foreach (memberName; __traits(allMembers, T)) {
members ~= memberName;

static if (!isCallable!(__traits(getMember, T, memberName)) && memberName != "Monitor") {
Expand Down

0 comments on commit 194cc39

Please sign in to comment.