From 288f6ead9f6ce51287def3b623f6795a7ffd1e25 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 28 Oct 2016 23:05:35 +0200 Subject: [PATCH] randomltl: fix initialization of the simplifier, caught by PVS-Studio For #192. * spot/tl/randomltl.cc: Here. --- spot/tl/randomltl.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spot/tl/randomltl.cc b/spot/tl/randomltl.cc index 95947667a..f7ff25162 100644 --- a/spot/tl/randomltl.cc +++ b/spot/tl/randomltl.cc @@ -406,13 +406,14 @@ namespace spot char* opt_pL, char* opt_pS, char* opt_pB) + : opt_simpl_level_(opts.get("simplification_level", 3)), + simpl_(tl_simplifier_options{opt_simpl_level_}) { aprops_ = aprops; output_ = opts.get("output", OUTPUTLTL); opt_seed_ = opts.get("seed", 0); opt_tree_size_min_ = opts.get("tree_size_min", 15); opt_tree_size_max_ = opts.get("tree_size_max", 15); - opt_simpl_level_ = opts.get("simplification_level", 3); opt_unique_ = opts.get("unique", 1); opt_wf_ = opts.get("wf", 0); @@ -470,8 +471,6 @@ namespace spot + std::string(tok_pB)); spot::srand(opt_seed_); - tl_simplifier_options simpl_opts(opt_simpl_level_); - tl_simplifier simpl_(simpl_opts); } randltlgenerator::randltlgenerator(int aprops_n,