@@ -235,6 +235,8 @@ template <typename T, typename W> struct weighted_list {
235
235
}
236
236
237
237
void deserialize ( const JsonValue &jv ) {
238
+ // this function does things in a way that makes clang-tidy unhappy
239
+ // CATA_DO_NOT_CHECK_SERIALIZE
238
240
if ( jv.test_array () ) {
239
241
for ( const JsonValue entry : jv.get_array () ) {
240
242
if ( entry.test_array () ) {
@@ -248,7 +250,7 @@ template <typename T, typename W> struct weighted_list {
248
250
}
249
251
}
250
252
} else {
251
- jv.throw_error ( " weighted list must be in format [[a, b], ... ]" );
253
+ jv.throw_error ( " weighted list must be in format [[a, b], … ]" );
252
254
}
253
255
}
254
256
@@ -264,7 +266,7 @@ template <typename T, typename W> struct weighted_list {
264
266
template <typename T> struct weighted_int_list : public weighted_list <T, int > {
265
267
266
268
weighted_int_list () = default ;
267
- weighted_int_list ( int default_weight ) : default_weight( default_weight ) {};
269
+ explicit weighted_int_list ( int default_weight ) : default_weight( default_weight ) {};
268
270
// populate the precalc_array for O(1) lookups
269
271
void precalc () {
270
272
precalc_array.clear ();
@@ -314,7 +316,7 @@ template <typename T> struct weighted_float_list : public weighted_list<T, doubl
314
316
315
317
// TODO: precalc using alias method
316
318
weighted_float_list () = default ;
317
- weighted_float_list ( int default_weight ) : default_weight( default_weight ) {};
319
+ explicit weighted_float_list ( int default_weight ) : default_weight( default_weight ) {};
318
320
319
321
protected:
320
322
0 commit comments