Skip to content

Commit

Permalink
Fix JSON issue on MSVC 2017
Browse files Browse the repository at this point in the history
On MSVC 2017 the implicit cast to string doesn't work due a C++ issue, so I fix it following the JSON library usage.
Reference:
https://github.com/nlohmann/json#basic-usage
nlohmann/json#861
  • Loading branch information
RealGreenDragon authored Jan 18, 2018
1 parent 9e39d5c commit c151cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yocto/yocto_gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3139,7 +3139,7 @@ inline void serialize_from_json(bool& val, const json& js) {
// Parse std::string function.
inline void serialize_from_json(string& val, const json& js) {
if (!js.is_string()) throw runtime_error("string expected");
val = js;
val = js.get<std::string>();
}

// Parse json function.
Expand Down

0 comments on commit c151cd5

Please sign in to comment.