On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote: > - if (o->type == operand::OP_CAPTURE) > + if (is_a<capture *> (o)) > { > - capture *c = static_cast<capture *> (o); > - fprintf (f, "@%s", (static_cast<capture *> (o))->where); > + capture *c = as_a<capture *> (o);
FWIW, if you're doing an is_a<T> followed by a new declaration with an as_a<T>, that can be done in one line with is-a.h as: if (capture *c = dyn_cast <capture *> (o))