@@ -38,13 +38,13 @@ namespace reflect {
3838
3939template <typename T>
4040typename std::enable_if<ext_traits::is_back_insertable<T>::value,void >::type
41- read_typed_array (jsoncons::span<uint8_t > typed_array, typed_array_element_type element_type, T& v)
41+ read_typed_array (jsoncons::span<uint8_t > typed_array, typed_array_values element_type, T& v)
4242{
4343 using value_type = typename T::value_type;
4444
4545 switch (element_type)
4646 {
47- case typed_array_element_type::uint8 :
47+ case typed_array_values::uint8_value :
4848 {
4949 auto ta = typed_array_cast<const uint8_t >(typed_array);
5050 for (auto item : ta)
@@ -53,7 +53,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
5353 }
5454 break ;
5555 }
56- case typed_array_element_type::uint16 :
56+ case typed_array_values::uint16_value :
5757 {
5858 auto ta = typed_array_cast<const uint16_t >(typed_array);
5959 for (auto item : ta)
@@ -62,7 +62,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
6262 }
6363 break ;
6464 }
65- case typed_array_element_type::uint32 :
65+ case typed_array_values::uint32_value :
6666 {
6767 auto ta = typed_array_cast<const uint32_t >(typed_array);
6868 for (auto item : ta)
@@ -71,7 +71,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
7171 }
7272 break ;
7373 }
74- case typed_array_element_type::uint64 :
74+ case typed_array_values::uint64_value :
7575 {
7676 auto ta = typed_array_cast<const uint64_t >(typed_array);
7777 for (auto item : ta)
@@ -80,7 +80,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
8080 }
8181 break ;
8282 }
83- case typed_array_element_type::int8 :
83+ case typed_array_values::int8_value :
8484 {
8585 auto ta = typed_array_cast<const int8_t >(typed_array);
8686 for (auto item : ta)
@@ -89,7 +89,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
8989 }
9090 break ;
9191 }
92- case typed_array_element_type::int16 :
92+ case typed_array_values::int16_value :
9393 {
9494 auto ta = typed_array_cast<const int16_t >(typed_array);
9595 for (auto item : ta)
@@ -98,7 +98,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
9898 }
9999 break ;
100100 }
101- case typed_array_element_type::int32 :
101+ case typed_array_values::int32_value :
102102 {
103103 auto ta = typed_array_cast<const int32_t >(typed_array);
104104 for (auto item : ta)
@@ -107,7 +107,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
107107 }
108108 break ;
109109 }
110- case typed_array_element_type::int64 :
110+ case typed_array_values::int64_value :
111111 {
112112 auto ta = typed_array_cast<const int64_t >(typed_array);
113113 for (auto item : ta)
@@ -116,7 +116,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
116116 }
117117 break ;
118118 }
119- case typed_array_element_type::half_float :
119+ case typed_array_values::half_value :
120120 {
121121 auto ta = typed_array_cast<const int16_t >(typed_array);
122122 for (auto item : ta)
@@ -125,7 +125,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
125125 }
126126 break ;
127127 }
128- case typed_array_element_type::float32 :
128+ case typed_array_values::float_value :
129129 {
130130 auto ta = typed_array_cast<const float >(typed_array);
131131 for (auto item : ta)
@@ -134,7 +134,7 @@ read_typed_array(jsoncons::span<uint8_t> typed_array, typed_array_element_type e
134134 }
135135 break ;
136136 }
137- case typed_array_element_type::float64 :
137+ case typed_array_values::double_value :
138138 {
139139 auto ta = typed_array_cast<const double >(typed_array);
140140 for (auto item : ta)
@@ -424,7 +424,7 @@ struct decode_traits<T,
424424 if (cursor.is_typed_array ())
425425 {
426426 read_typed_array (cursor.typed_array (), cursor.element_type (), v);
427- cursor.clear_typed_array ();
427+ cursor.to_end_array ();
428428 }
429429 else
430430 {
@@ -493,7 +493,7 @@ struct decode_traits<T,
493493 if (cursor.is_typed_array ())
494494 {
495495 read_typed_array (cursor.typed_array (), cursor.element_type (), v);
496- cursor.clear_typed_array ();
496+ cursor.to_end_array ();
497497 }
498498 else
499499 {
0 commit comments