diff --git a/spot/misc/bitvect.cc b/spot/misc/bitvect.cc index fafb9c350..3dfd80288 100644 --- a/spot/misc/bitvect.cc +++ b/spot/misc/bitvect.cc @@ -1,6 +1,6 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2013, 2014, 2017 Laboratoire de Recherche et Développement -// de l'Epita (LRDE). +// Copyright (C) 2013, 2014, 2017, 2018 Laboratoire de Recherche et +// Développement de l'Epita (LRDE). // // This file is part of Spot, a model checking library. // @@ -115,7 +115,7 @@ namespace spot return res; } - size_t bitvect::hash() const + size_t bitvect::hash() const noexcept { block_t res = fnv::init(); diff --git a/spot/misc/bitvect.hh b/spot/misc/bitvect.hh index 721aa9956..cf5771804 100644 --- a/spot/misc/bitvect.hh +++ b/spot/misc/bitvect.hh @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2013-2017 Laboratoire de Recherche et Développement +// Copyright (C) 2013-2018 Laboratoire de Recherche et Développement // de l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -156,7 +156,7 @@ namespace spot return 8 * block_count_ * sizeof(block_t); } - size_t hash() const; + size_t hash() const noexcept; bool get(size_t pos) const { diff --git a/spot/misc/hash.hh b/spot/misc/hash.hh index 33dd3f233..9e6c9c696 100644 --- a/spot/misc/hash.hh +++ b/spot/misc/hash.hh @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2008, 2011, 2014, 2015 Laboratoire de Recherche et +// Copyright (C) 2008, 2011, 2014, 2015, 2018 Laboratoire de Recherche et // Développement de l'Epita (LRDE). // Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de // Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), @@ -46,7 +46,7 @@ namespace spot { } - size_t operator()(const T* p) const + size_t operator()(const T* p) const noexcept { return knuth32_hash(reinterpret_cast(p) - static_cast(nullptr)); @@ -63,13 +63,13 @@ namespace spot struct identity_hash: public std::unary_function { - // A default constructor is needed if the string_hash object is + // A default constructor is needed if the identity_hash object is // stored in a const member. identity_hash() { } - size_t operator()(const T& s) const + size_t operator()(const T& s) const noexcept { return s; } @@ -79,7 +79,7 @@ namespace spot struct pair_hash { template - std::size_t operator()(const std::pair &p) const + std::size_t operator()(const std::pair &p) const noexcept { std::hash th; std::hash uh; diff --git a/spot/twa/acc.hh b/spot/twa/acc.hh index a1ffa4ee4..85b4b67f6 100644 --- a/spot/twa/acc.hh +++ b/spot/twa/acc.hh @@ -1,6 +1,6 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2014, 2015, 2016, 2017 Laboratoire de Recherche et -// Développement de l'Epita. +// Copyright (C) 2014-2018 Laboratoire de Recherche et Développement +// de l'Epita. // // This file is part of Spot, a model checking library. // @@ -1526,7 +1526,7 @@ namespace std template<> struct hash { - size_t operator()(spot::acc_cond::mark_t m) const + size_t operator()(spot::acc_cond::mark_t m) const noexcept { std::hash h; return h(m.id); diff --git a/spot/twaalgos/cobuchi.cc b/spot/twaalgos/cobuchi.cc index f8ff881e0..9e9a55de9 100644 --- a/spot/twaalgos/cobuchi.cc +++ b/spot/twaalgos/cobuchi.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2017 Laboratoire de Recherche et Développement +// Copyright (C) 2017, 2018 Laboratoire de Recherche et Développement // de l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -292,7 +292,8 @@ namespace spot { struct mp_hash { - size_t operator()(std::pair bv) const + size_t + operator()(std::pair bv) const noexcept { size_t res = 0; size_t size = bv.second->size(); diff --git a/spot/twaalgos/degen.cc b/spot/twaalgos/degen.cc index 1fd83a964..dfa0d19ab 100644 --- a/spot/twaalgos/degen.cc +++ b/spot/twaalgos/degen.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2012-2017 Laboratoire de Recherche +// Copyright (C) 2012-2018 Laboratoire de Recherche // et Développement de l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -44,7 +44,7 @@ namespace spot struct degen_state_hash { size_t - operator()(const degen_state& s) const + operator()(const degen_state& s) const noexcept { return wang32_hash(s.first ^ wang32_hash(s.second)); } diff --git a/spot/twaalgos/determinize.cc b/spot/twaalgos/determinize.cc index dfbd66797..bfb2bc9e3 100644 --- a/spot/twaalgos/determinize.cc +++ b/spot/twaalgos/determinize.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2015-2017 Laboratoire de Recherche et +// Copyright (C) 2015-2018 Laboratoire de Recherche et // Développement de l'Epita. // // This file is part of Spot, a model checking library. @@ -115,7 +115,7 @@ namespace spot struct hash_safra { size_t - operator()(const safra_state& s) const + operator()(const safra_state& s) const noexcept { return s.hash(); } diff --git a/spot/twaalgos/parity.cc b/spot/twaalgos/parity.cc index 9ad46fc44..5908baf10 100644 --- a/spot/twaalgos/parity.cc +++ b/spot/twaalgos/parity.cc @@ -427,7 +427,7 @@ namespace spot struct state_history_hash { size_t - operator()(const state_history& mat) const + operator()(const state_history& mat) const noexcept { unsigned result = 0; for (unsigned i = 0; i < mat.get_left_num_sets(); ++i) @@ -493,7 +493,7 @@ namespace spot struct sh_succ_hash { size_t - operator()(std::tuple x) const + operator()(std::tuple x) const noexcept { return wang32_hash(std::get<0>(x) ^ wang32_hash(std::get<1>(x) ^ wang32_hash(std::get<2>(x)))); @@ -510,7 +510,7 @@ namespace spot struct product_state_hash { size_t - operator()(product_state_t s) const + operator()(product_state_t s) const noexcept { return wang32_hash(std::get<0>(s) ^ wang32_hash(std::get<1>(s) ^ wang32_hash(std::get<2>(s)))); diff --git a/spot/twaalgos/powerset.cc b/spot/twaalgos/powerset.cc index 447a2ebf2..516945841 100644 --- a/spot/twaalgos/powerset.cc +++ b/spot/twaalgos/powerset.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2009-2011, 2013-2017 Laboratoire de Recherche et +// Copyright (C) 2009-2011, 2013-2018 Laboratoire de Recherche et // Développement de l'Epita (LRDE). // Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre @@ -56,7 +56,7 @@ namespace spot struct bv_hash { - size_t operator()(const bitvect* bv) const + size_t operator()(const bitvect* bv) const noexcept { return bv->hash(); } diff --git a/spot/twaalgos/product.cc b/spot/twaalgos/product.cc index 56974a331..ab0aa13df 100644 --- a/spot/twaalgos/product.cc +++ b/spot/twaalgos/product.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2014-2017 Laboratoire de Recherche et Développement +// Copyright (C) 2014-2018 Laboratoire de Recherche et Développement // de l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -33,7 +33,7 @@ namespace spot struct product_state_hash { size_t - operator()(product_state s) const + operator()(product_state s) const noexcept { return wang32_hash(s.first ^ wang32_hash(s.second)); } diff --git a/spot/twaalgos/stutter.cc b/spot/twaalgos/stutter.cc index a371c1499..8fd9cbd48 100644 --- a/spot/twaalgos/stutter.cc +++ b/spot/twaalgos/stutter.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2014-2017 Laboratoire de Recherche et Développement de +// Copyright (C) 2014-2018 Laboratoire de Recherche et Développement de // l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -255,7 +255,7 @@ namespace spot struct stutter_state_hash { size_t - operator()(const stutter_state& s) const + operator()(const stutter_state& s) const noexcept { return wang32_hash(s.first) ^ wang32_hash(s.second.id()); } diff --git a/spot/twaalgos/totgba.cc b/spot/twaalgos/totgba.cc index 9dac455e4..9403d5075 100644 --- a/spot/twaalgos/totgba.cc +++ b/spot/twaalgos/totgba.cc @@ -446,7 +446,7 @@ namespace spot struct st2gba_state_hash { size_t - operator()(const st2gba_state& s) const + operator()(const st2gba_state& s) const noexcept { std::hash h; return s.s ^ h(s.pend); diff --git a/spot/twaalgos/toweak.cc b/spot/twaalgos/toweak.cc index bca717cbb..efebee736 100644 --- a/spot/twaalgos/toweak.cc +++ b/spot/twaalgos/toweak.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2017 Laboratoire de Recherche et Développement +// Copyright (C) 2017, 2018 Laboratoire de Recherche et Développement // de l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -46,7 +46,7 @@ namespace spot struct rc_state_hash { size_t - operator()(const rc_state& s) const + operator()(const rc_state& s) const noexcept { using std::hash; return ((hash()(s.id)