Skip to content
  • Alexandre Duret-Lutz's avatar
    Get rid of all dynamic_cast<>s while working on LTL formulae. · 957ba664
    Alexandre Duret-Lutz authored
    They are too slow.
    
    * src/ltlast/formula.hh (opkind, kind, kind_): Use an enum
    to indicate the actual kind of the formula.  This way we can
    check the kind of a formula without relying on dynamic_cast.
    * src/ltlast/atomic_prop.cc, src/ltlast/automatop.cc,
    src/ltlast/binop.cc, src/ltlast/bunop.cc, src/ltlast/constant.cc,
    src/ltlast/multop.cc, src/ltlast/refformula.cc,
    src/ltlast/refformula.hh, src/ltlast/unop.cc: Adjust constructors.
    * src/ltlvisit/basicreduce.cc, src/ltlvisit/mark.cc,
    src/ltlvisit/reduce.cc, src/ltlvisit/syntimpl.cc,
    src/ltlvisit/tostring.cc: Replace all dynamic_cast by a
    call to kind() followed by a static_cast.
    957ba664