material-foundation / material-color-utilities

Color libraries for Material You
Apache License 2.0
1.57k stars 134 forks source link

Cpp version does not conform to standard #91

Open SimonMarynissen opened 1 year ago

SimonMarynissen commented 1 year ago

When I compiled the library, I got a few Error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax in MSVC. For example in hct_solver.cc, there is (Vec3){r, g, b};. This can be replaced by using standard C++11 aggregate initialization: Vec3{r, g, b};.

I have also noticed the use absl/container/flat_hash_map.h in wsmeans.cc and absl/strings/str_cat.h in utils.cc for only a few lines of code. They are easily replaced by std utilities, but understandable for a google project to use abseil.