mirror of
https://github.com/nlohmann/json.git
synced 2025-08-09 05:22:48 +03:00
👌 fixed some compiler warnings
This commit is contained in:
@@ -96,7 +96,9 @@ class parser
|
||||
|
||||
/// a parse error occurred
|
||||
/// the byte position and the last token are reported
|
||||
virtual bool parse_error(int position, const std::string& last_token) = 0;
|
||||
virtual bool parse_error(std::size_t position, const std::string& last_token) = 0;
|
||||
|
||||
virtual ~SAX() = default;
|
||||
};
|
||||
|
||||
using parser_callback_t =
|
||||
@@ -585,7 +587,7 @@ class parser
|
||||
{
|
||||
case token_type::begin_object:
|
||||
{
|
||||
if (not sax->start_object(-1))
|
||||
if (not sax->start_object(std::size_t(-1)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -654,7 +656,7 @@ class parser
|
||||
|
||||
case token_type::begin_array:
|
||||
{
|
||||
if (not sax->start_array(-1))
|
||||
if (not sax->start_array(std::size_t(-1)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user