Skip to content

Commit

Permalink
- json: sorted class fields (#2)
Browse files Browse the repository at this point in the history
    - change ordered search threshold from 8 to 4
  • Loading branch information
oknenavin committed Jun 10, 2024
1 parent 34b3ff1 commit 1116664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cxon/lang/common/cio/class.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ namespace cxon { namespace cio { namespace cls {

template <typename X, typename T, typename ...Fs, typename II, typename Cx>
constexpr bool read_field_(T& t, const char* name, const fields_for_read<T, Fs...>& fs, int (&st)[sizeof...(Fs)], II& i, II e, Cx& cx) {
return fs.ordered && sizeof...(Fs) > 8 ?
return fs.ordered && sizeof...(Fs) > 4 ?
read_ordered_ <X, 0, sizeof...(Fs) - 1>::field(t, name, fs, st, i, e, cx) :
read_unordered_<X, 0, sizeof...(Fs) >::field(t, name, fs, st, i, e, cx)
;
Expand Down

0 comments on commit 1116664

Please sign in to comment.