@@ -53,7 +53,7 @@ void mc_FLE2FindRangePayloadV2_cleanup(mc_FLE2FindRangePayloadV2_t *payload) {
53
53
return false; \
54
54
}
55
55
56
- bool mc_FLE2FindRangePayloadV2_serialize (const mc_FLE2FindRangePayloadV2_t * payload , bson_t * out , bool use_range_v2 ) {
56
+ bool mc_FLE2FindRangePayloadV2_serialize (const mc_FLE2FindRangePayloadV2_t * payload , bson_t * out ) {
57
57
BSON_ASSERT_PARAM (out );
58
58
BSON_ASSERT_PARAM (payload );
59
59
@@ -131,39 +131,37 @@ bool mc_FLE2FindRangePayloadV2_serialize(const mc_FLE2FindRangePayloadV2_t *payl
131
131
return false;
132
132
}
133
133
134
- if (use_range_v2 ) {
135
- // Encode parameters that were used to generate the mincover.
136
- // The crypto parameters are all optionally set. Find payloads may come in pairs (a lower and upper bound).
137
- // One of the pair includes the mincover. The other payload was not generated with crypto parameters.
134
+ // Encode parameters that were used to generate the mincover.
135
+ // The crypto parameters are all optionally set. Find payloads may come in pairs (a lower and upper bound).
136
+ // One of the pair includes the mincover. The other payload was not generated with crypto parameters.
138
137
139
- if (payload -> sparsity .set ) {
140
- if (!BSON_APPEND_INT64 (out , "sp" , payload -> sparsity .value )) {
141
- return false;
142
- }
138
+ if (payload -> sparsity .set ) {
139
+ if (!BSON_APPEND_INT64 (out , "sp" , payload -> sparsity .value )) {
140
+ return false;
143
141
}
142
+ }
144
143
145
- if (payload -> precision .set ) {
146
- if (!BSON_APPEND_INT32 (out , "pn" , payload -> precision .value )) {
147
- return false;
148
- }
144
+ if (payload -> precision .set ) {
145
+ if (!BSON_APPEND_INT32 (out , "pn" , payload -> precision .value )) {
146
+ return false;
149
147
}
148
+ }
150
149
151
- if (payload -> trimFactor .set ) {
152
- if (!BSON_APPEND_INT32 (out , "tf" , payload -> trimFactor .value )) {
153
- return false;
154
- }
150
+ if (payload -> trimFactor .set ) {
151
+ if (!BSON_APPEND_INT32 (out , "tf" , payload -> trimFactor .value )) {
152
+ return false;
155
153
}
154
+ }
156
155
157
- if (payload -> indexMin .value_type != BSON_TYPE_EOD ) {
158
- if (!BSON_APPEND_VALUE (out , "mn" , & payload -> indexMin )) {
159
- return false;
160
- }
156
+ if (payload -> indexMin .value_type != BSON_TYPE_EOD ) {
157
+ if (!BSON_APPEND_VALUE (out , "mn" , & payload -> indexMin )) {
158
+ return false;
161
159
}
160
+ }
162
161
163
- if (payload -> indexMax .value_type != BSON_TYPE_EOD ) {
164
- if (!BSON_APPEND_VALUE (out , "mx" , & payload -> indexMax )) {
165
- return false;
166
- }
162
+ if (payload -> indexMax .value_type != BSON_TYPE_EOD ) {
163
+ if (!BSON_APPEND_VALUE (out , "mx" , & payload -> indexMax )) {
164
+ return false;
167
165
}
168
166
}
169
167
0 commit comments