diff --git a/bin/common_finput.hh b/bin/common_finput.hh index 54f31458a..5d8feb3ed 100644 --- a/bin/common_finput.hh +++ b/bin/common_finput.hh @@ -30,7 +30,7 @@ struct job const char* str; bool file_p; // true if str is a filename, false if it is a formula - job(const char* str, bool file_p) + job(const char* str, bool file_p) noexcept : str(str), file_p(file_p) { } diff --git a/bin/common_trans.cc b/bin/common_trans.cc index ee990a1d3..0b82e9da7 100644 --- a/bin/common_trans.cc +++ b/bin/common_trans.cc @@ -88,7 +88,7 @@ static void show_shorthands(shorthands_t* begin, shorthands_t* end) tool_spec::tool_spec(const char* spec, shorthands_t* begin, shorthands_t* end, - bool is_ref) + bool is_ref) noexcept : spec(spec), cmd(spec), name(spec), reference(is_ref) { if (*cmd == '{') @@ -150,7 +150,7 @@ tool_spec::tool_spec(const char* spec, shorthands_t* begin, shorthands_t* end, cmd = strdup(cmd); } -tool_spec::tool_spec(const tool_spec& other) +tool_spec::tool_spec(const tool_spec& other) noexcept : spec(other.spec), cmd(other.cmd), name(other.name), reference(other.reference) { diff --git a/bin/common_trans.hh b/bin/common_trans.hh index 9426cd692..d95350abc 100644 --- a/bin/common_trans.hh +++ b/bin/common_trans.hh @@ -51,8 +51,8 @@ struct tool_spec bool reference; tool_spec(const char* spec, shorthands_t* begin, shorthands_t* end, - bool is_ref); - tool_spec(const tool_spec& other); + bool is_ref) noexcept; + tool_spec(const tool_spec& other) noexcept; tool_spec& operator=(const tool_spec& other); ~tool_spec(); }; diff --git a/spot/misc/minato.hh b/spot/misc/minato.hh index d305b059a..6d5b2864a 100644 --- a/spot/misc/minato.hh +++ b/spot/misc/minato.hh @@ -90,7 +90,7 @@ namespace spot bdd f0_min, f0_max; bdd f1_min, f1_max; bdd g0, g1; - local_vars(bdd f_min, bdd f_max, bdd vars) + local_vars(bdd f_min, bdd f_max, bdd vars) noexcept : f_min(f_min), f_max(f_max), step(FirstStep), vars(vars) {} }; std::stack todo_; diff --git a/spot/ta/ta.cc b/spot/ta/ta.cc index 13a766801..f69df726c 100644 --- a/spot/ta/ta.cc +++ b/spot/ta/ta.cc @@ -25,7 +25,7 @@ namespace spot { - scc_stack_ta::connected_component::connected_component(int i) + scc_stack_ta::connected_component::connected_component(int i) noexcept { index = i; is_accepting = false; diff --git a/spot/ta/ta.hh b/spot/ta/ta.hh index 045cedf6b..72b481894 100644 --- a/spot/ta/ta.hh +++ b/spot/ta/ta.hh @@ -211,7 +211,7 @@ namespace spot struct connected_component { public: - connected_component(int index = -1); + connected_component(int index = -1) noexcept; /// Index of the SCC. int index; diff --git a/spot/twa/acc.hh b/spot/twa/acc.hh index 5949afe23..061690e23 100644 --- a/spot/twa/acc.hh +++ b/spot/twa/acc.hh @@ -1140,7 +1140,7 @@ namespace spot rs_pair(const rs_pair&) = default; #endif - rs_pair(acc_cond::mark_t fin, acc_cond::mark_t inf): + rs_pair(acc_cond::mark_t fin, acc_cond::mark_t inf) noexcept: fin(fin), inf(inf) {} diff --git a/spot/twaalgos/cycles.hh b/spot/twaalgos/cycles.hh index b7496109f..fa8fbd1bc 100644 --- a/spot/twaalgos/cycles.hh +++ b/spot/twaalgos/cycles.hh @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et +// Copyright (C) 2012, 2013, 2014, 2015, 2018 Laboratoire de Recherche et // Développement de l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -116,7 +116,8 @@ namespace spot unsigned s; unsigned succ = 0U; bool f = false; - dfs_entry(unsigned s): s(s) + dfs_entry(unsigned s) noexcept + : s(s) { } }; diff --git a/spot/twaalgos/emptiness.hh b/spot/twaalgos/emptiness.hh index c83a9e768..0ddda3f6d 100644 --- a/spot/twaalgos/emptiness.hh +++ b/spot/twaalgos/emptiness.hh @@ -379,13 +379,11 @@ namespace spot bdd label; acc_cond::mark_t acc; - step(const state* s, bdd label, acc_cond::mark_t acc) + step(const state* s, bdd label, acc_cond::mark_t acc) noexcept : s(s), label(label), acc(acc) { } - step() - { - } + step() = default; }; typedef std::list steps; @@ -395,7 +393,7 @@ namespace spot const_twa_ptr aut; ~twa_run(); - twa_run(const const_twa_ptr& aut) + twa_run(const const_twa_ptr& aut) noexcept : aut(aut) { } diff --git a/spot/twaalgos/gtec/gtec.hh b/spot/twaalgos/gtec/gtec.hh index f5ea41284..b0a2e5188 100644 --- a/spot/twaalgos/gtec/gtec.hh +++ b/spot/twaalgos/gtec/gtec.hh @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2008, 2013, 2014, 2015, 2016 Laboratoire de Recherche +// Copyright (C) 2008, 2013, 2014, 2015, 2016, 2018 Laboratoire de Recherche // et Développement de l'Epita (LRDE). // Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de // Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), @@ -197,7 +197,8 @@ namespace spot struct successor { acc_cond::mark_t acc; const spot::state* s; - successor(acc_cond::mark_t acc, const spot::state* s): acc(acc), s(s) {} + successor(acc_cond::mark_t acc, const spot::state* s) noexcept + : acc(acc), s(s) {} }; // We use five main data in this algorithm: diff --git a/spot/twaalgos/ndfs_result.hxx b/spot/twaalgos/ndfs_result.hxx index 5bf649768..bc0c7f3f1 100644 --- a/spot/twaalgos/ndfs_result.hxx +++ b/spot/twaalgos/ndfs_result.hxx @@ -44,7 +44,7 @@ namespace spot struct stack_item { stack_item(const state* n, twa_succ_iterator* i, bdd l, acc_cond::mark_t a) - : s(n), it(i), label(l), acc(a) {}; + noexcept : s(n), it(i), label(l), acc(a) {}; /// The visited state. const state* s; /// Design the next successor of \a s which has to be visited. diff --git a/spot/twaalgos/sccinfo.hh b/spot/twaalgos/sccinfo.hh index 392d1235f..16297f16e 100644 --- a/spot/twaalgos/sccinfo.hh +++ b/spot/twaalgos/sccinfo.hh @@ -229,15 +229,15 @@ namespace spot bool rejecting_:1; // Necessarily rejecting bool useful_:1; public: - scc_info_node(): + scc_info_node() noexcept: acc_({}), trivial_(true), accepting_(false), rejecting_(false), useful_(false) { } scc_info_node(acc_cond::mark_t acc, - acc_cond::mark_t common, bool trivial): - acc_(acc), common_(common), + acc_cond::mark_t common, bool trivial) noexcept + : acc_(acc), common_(common), trivial_(trivial), accepting_(false), rejecting_(false), useful_(false) { diff --git a/spot/twaalgos/word.cc b/spot/twaalgos/word.cc index ce5bd5861..c2df89524 100644 --- a/spot/twaalgos/word.cc +++ b/spot/twaalgos/word.cc @@ -29,7 +29,7 @@ using namespace std::string_literals; namespace spot { - twa_word::twa_word(const twa_run_ptr& run) + twa_word::twa_word(const twa_run_ptr& run) noexcept : dict_(run->aut->get_dict()) { for (auto& i: run->prefix) @@ -39,7 +39,7 @@ namespace spot dict_->register_all_variables_of(run->aut, this); } - twa_word::twa_word(const bdd_dict_ptr& dict) + twa_word::twa_word(const bdd_dict_ptr& dict) noexcept : dict_(dict) { } diff --git a/spot/twaalgos/word.hh b/spot/twaalgos/word.hh index 419b144de..5e35c02c6 100644 --- a/spot/twaalgos/word.hh +++ b/spot/twaalgos/word.hh @@ -33,8 +33,8 @@ namespace spot /// BDDs: one list of the prefix, one list for the cycle. struct SPOT_API twa_word final { - twa_word(const bdd_dict_ptr& dict); - twa_word(const twa_run_ptr& run); + twa_word(const bdd_dict_ptr& dict) noexcept; + twa_word(const twa_run_ptr& run) noexcept; ~twa_word() { dict_->unregister_all_my_variables(this);