1 --- grive-27817e835fe115ebbda5410ec904aa49a2ad01f1/libgrive/src/protocol/Json.cc.orig 2020-05-02 09:07:09.733415940 +0200
2 +++ grive-27817e835fe115ebbda5410ec904aa49a2ad01f1/libgrive/src/protocol/Json.cc 2020-05-02 09:11:48.378573057 +0200
4 bool Json::Has( const std::string& key ) const
6 assert( m_json != 0 ) ;
7 - return ::json_object_object_get_ex( m_json, key.c_str(), 0 ) == TRUE ;
8 + return ::json_object_object_get_ex( m_json, key.c_str(), 0 ) == 1 ;
11 bool Json::Get( const std::string& key, Json& json ) const
13 bool Json::Bool() const
15 assert( m_json != 0 ) ;
16 - return ::json_object_get_boolean( m_json ) == TRUE ;
17 + return ::json_object_get_boolean( m_json ) == 1 ;
21 bool Json::Is<bool>() const
23 assert( m_json != 0 ) ;
24 - return ::json_object_is_type( m_json, json_type_boolean ) == TRUE ;
25 + return ::json_object_is_type( m_json, json_type_boolean ) == 1 ;
30 bool Json::Is<std::string>() const
32 assert( m_json != 0 ) ;
33 - return ::json_object_is_type( m_json, json_type_string ) == TRUE ;
34 + return ::json_object_is_type( m_json, json_type_string ) == 1 ;
39 bool Json::Is<int>() const
41 assert( m_json != 0 ) ;
42 - return ::json_object_is_type( m_json, json_type_int ) == TRUE ;
43 + return ::json_object_is_type( m_json, json_type_int ) == 1 ;
48 bool Json::Is<Json::Object>() const
50 assert( m_json != 0 ) ;
51 - return ::json_object_is_type( m_json, json_type_object ) == TRUE ;
52 + return ::json_object_is_type( m_json, json_type_object ) == 1 ;
57 bool Json::Is<Json::Array>() const
59 assert( m_json != 0 ) ;
60 - return ::json_object_is_type( m_json, json_type_array ) == TRUE ;
61 + return ::json_object_is_type( m_json, json_type_array ) == 1 ;