Do not deprecate whole class but only constructors of Json::Reader.

This should fix warning C4996 issued by Visual Studio in cases where
Json::Reader is not even used by client code.
This commit is contained in:
Christof Krüger 2018-01-12 21:35:17 +01:00 committed by Christopher Dunn
parent 0ced843c97
commit edb4bdb7ec

View File

@ -32,7 +32,7 @@ namespace Json {
*
* \deprecated Use CharReader and CharReaderBuilder.
*/
class JSONCPP_DEPRECATED("Use CharReader and CharReaderBuilder instead") JSON_API Reader {
class JSON_API Reader {
public:
typedef char Char;
typedef const Char* Location;
@ -52,11 +52,13 @@ public:
/** \brief Constructs a Reader allowing all features
* for parsing.
*/
JSONCPP_DEPRECATED("Use CharReader and CharReaderBuilder instead")
Reader();
/** \brief Constructs a Reader allowing the specified feature set
* for parsing.
*/
JSONCPP_DEPRECATED("Use CharReader and CharReaderBuilder instead")
Reader(const Features& features);
/** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>