Skip to content

Commit a64dc5f

Browse files
committed
move typed_array from visitor to cursor
1 parent d2e4dab commit a64dc5f

4 files changed

Lines changed: 250 additions & 28 deletions

File tree

include/jsoncons/staj_cursor.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ class basic_staj_visitor : public basic_json_visitor<CharT>
9898
}
9999
}
100100

101-
bool is_typed_array() const
101+
virtual bool is_typed_array() const
102102
{
103-
return data_.type() != typed_array_element_type();
103+
return false;
104104
}
105105

106106
staj_cursor_state state() const
@@ -695,6 +695,10 @@ class basic_staj_cursor
695695

696696
virtual std::size_t column() const = 0;
697697

698+
virtual bool is_typed_array() const
699+
{
700+
return false;
701+
}
698702
};
699703

700704
template <typename CharT>

include/jsoncons_ext/cbor/cbor_cursor.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ class basic_cbor_cursor : public basic_staj_cursor<char>, private virtual ser_co
163163
return parser_.raw_tag();
164164
}
165165

166-
bool is_typed_array() const
166+
bool is_typed_array() const final
167167
{
168-
return cursor_visitor_.is_typed_array();
168+
return parser_.is_typed_array();
169169
}
170170

171171
const staj_event& current() const override

0 commit comments

Comments
 (0)