Added braces (clang warning corrected)

This commit is contained in:
Thomas FORGIONE 2015-03-24 09:27:49 +01:00
parent f1ca215d9d
commit a3428fa81c
2 changed files with 3 additions and 3 deletions

View File

@ -167,11 +167,11 @@ genColors(
for (auto const& child : structure.children)
{
geo::Tree<std::array<float,3>> tree;
tree.node = {
tree.node = {{
static_cast<float>(std::rand())/RAND_MAX,
static_cast<float>(std::rand())/RAND_MAX,
static_cast<float>(std::rand())/RAND_MAX
};
}};
colors.children.push_back(tree);
genColors(child, colors.children[colors.children.size()-1]);

View File

@ -124,7 +124,7 @@ int main(int argc, char *argv[])
float r = static_cast<float>(std::rand())/RAND_MAX;
float g = static_cast<float>(std::rand())/RAND_MAX;
float b = static_cast<float>(std::rand())/RAND_MAX;
colors.push_back({r,g,b});
colors.push_back({{r,g,b}});
}
// Camera