Skip to content

Commit

Permalink
Latest changes Ported to Windows (VS 2017).
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaa committed May 19, 2017
1 parent 1efb82c commit 5e7ed3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion externals/rapidjson
9 changes: 5 additions & 4 deletions include/restc-cpp/SerializeJson.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ struct get_len<std::string&> {
};


#ifndef _MSC_VER // g++, clang
#if !defined(_MSC_VER) || (_MSC_VER >= 1910) // g++, clang, Visual Studio from 2017

template <typename varT, typename valT,
typename std::enable_if<
Expand Down Expand Up @@ -269,8 +269,10 @@ void assign_value(varT& var, const valT& val) {

template <typename varT, typename valT>
void assign_value(varT var, valT val) {
RESTC_CPP_LOG_ERROR << "assign_value: Invalid data conversion from "
<< RESTC_CPP_TYPENAME(varT) << " to " << RESTC_CPP_TYPENAME(valT);
assert(false);
throw ParseException("assign_value: Invalid data conversion");
throw ParseException("assign_value: Invalid data conversion from ");
}

template <>
Expand Down Expand Up @@ -737,8 +739,7 @@ class RapidJsonDeserializer : public RapidJsonDeserializerBase {
+ sizeof(size_t) * 6 // FIXME: Find approximate average overhead for map
);

object_[current_name_] = val;

assign_value(object_[current_name_], val);
current_name_.clear();
return true;
}
Expand Down

0 comments on commit 5e7ed3e

Please sign in to comment.