From 1d7a20b2d575c84f6510acc2e5ea1ab32edd0913 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 23 Dec 2014 17:54:26 +0100 Subject: [PATCH] * src/tgba/tgbagraph.hh: Add a format_state for unsigned. --- src/tgba/tgbagraph.hh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/tgba/tgbagraph.hh b/src/tgba/tgbagraph.hh index 945d1332d..8d436e94c 100644 --- a/src/tgba/tgbagraph.hh +++ b/src/tgba/tgbagraph.hh @@ -173,6 +173,7 @@ namespace spot { public: typedef digraph graph_t; + typedef graph_t::trans_storage_t trans_storage_t; protected: graph_t g_; @@ -298,13 +299,18 @@ namespace spot return &g_.state_data(n); } - virtual std::string format_state(const state* st) const + std::string format_state(unsigned n) const { std::stringstream ss; - ss << state_number(st); + ss << n; return ss.str(); } + virtual std::string format_state(const state* st) const + { + return format_state(state_number(st)); + } + tgba_graph_trans_data& trans_data(const tgba_succ_iterator* it) { auto* i = down_cast*>(it); @@ -346,25 +352,25 @@ namespace spot return acc_.mark(0); } - graph_t::trans_storage_t& trans_storage(const tgba_succ_iterator* it) + trans_storage_t& trans_storage(const tgba_succ_iterator* it) { auto* i = down_cast*>(it); return g_.trans_storage(i->pos()); } - graph_t::trans_storage_t& trans_storage(unsigned t) + trans_storage_t& trans_storage(unsigned t) { return g_.trans_storage(t); } - const graph_t::trans_storage_t + const trans_storage_t trans_storage(const tgba_succ_iterator* it) const { auto* i = down_cast*>(it); return g_.trans_storage(i->pos()); } - const graph_t::trans_storage_t trans_storage(unsigned t) const + const trans_storage_t trans_storage(unsigned t) const { return g_.trans_storage(t); }