Skip to content

Commit c03f296

Browse files
committed
fix: Use backward-compatible default CLI value
Use `capture_default_str()` instead of `default_value()` for backward compatibility.
1 parent 2f09757 commit c03f296

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/queries.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ using wand_uniform_index_quantized = wand_data<wand_data_compressed<PayloadType:
460460
int main(int argc, const char** argv) {
461461
bool safe = false;
462462
bool quantized = false;
463-
std::size_t runs = 0;
463+
std::size_t runs = 3;
464464
std::optional<std::string> output_path;
465465

466466
App<arg::Index,
@@ -474,7 +474,9 @@ int main(int argc, const char** argv) {
474474
app.add_flag("--quantized", quantized, "Quantized scores");
475475
app.add_flag("--safe", safe, "Rerun if not enough results with pruning.")
476476
->needs(app.thresholds_option());
477-
app.add_option("--runs", runs, "Number of runs per query")->default_val(3)->check(CLI::PositiveNumber);
477+
app.add_option("--runs", runs, "Number of runs per query")
478+
->capture_default_str()
479+
->check(CLI::PositiveNumber);
478480
app.add_option("-o,--output", output_path, "Output file for per-run query timing data");
479481
CLI11_PARSE(app, argc, argv);
480482

0 commit comments

Comments
 (0)