Skip to content
Snippets Groups Projects
Commit f995f576 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Make code a better example

parent 9c28893e
No related branches found
No related tags found
No related merge requests found
......@@ -14,10 +14,10 @@ namespace simox
void color::from_json(const nlohmann::json& j, Color& color)
{
color.r = j.at("r");
color.g = j.at("g");
color.b = j.at("b");
color.a = j.at("a");
j.at("r").get_to(color.r);
j.at("g").get_to(color.g);
j.at("b").get_to(color.b);
j.at("a").get_to(color.a);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment