From f082700fb2b1679e25d60d96fadec3bfcabdb25b Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 29 Apr 2012 00:44:38 +0200 Subject: [PATCH] Fix constness of minimize_wdba() return. * src/tgbaalgos/minimize.hh, src/tgbaalgos/minimize.cc: Return a tgba*, not a const tgba*. --- src/tgbaalgos/minimize.cc | 4 ++-- src/tgbaalgos/minimize.hh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tgbaalgos/minimize.cc b/src/tgbaalgos/minimize.cc index 35e97d9e5..0cd19a9da 100644 --- a/src/tgbaalgos/minimize.cc +++ b/src/tgbaalgos/minimize.cc @@ -619,7 +619,7 @@ namespace spot return minimize_dfa(det_a, final, non_final); } - const tgba* + tgba* minimize_obligation(const tgba* aut_f, const ltl::formula* f, const tgba* aut_neg_f) { @@ -706,6 +706,6 @@ namespace spot if (ok) return min_aut_f; delete min_aut_f; - return aut_f; + return const_cast(aut_f); } } diff --git a/src/tgbaalgos/minimize.hh b/src/tgbaalgos/minimize.hh index 8ac29091a..e2d43f4c9 100644 --- a/src/tgbaalgos/minimize.hh +++ b/src/tgbaalgos/minimize.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2009, 2010, 2011 Laboratoire de Recherche et Développement +// Copyright (C) 2009, 2010, 2011, 2012 Laboratoire de Recherche et Développement // de l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -140,9 +140,9 @@ namespace spot /// product(aut_neg_f,minize(aut)) are both empty. If they /// are, the the minimization was sound. (See the paper for full /// details.) - const tgba* minimize_obligation(const tgba* aut_f, - const ltl::formula* f = 0, - const tgba* aut_neg_f = 0); + tgba* minimize_obligation(const tgba* aut_f, + const ltl::formula* f = 0, + const tgba* aut_neg_f = 0); /// @} }