M
Mike -- Email Ignored
class Base
{
....
}
class Child : public BASE
{
public:
Thing& getThing();
....
}
Base* pBase = new Child;
Base* qBase = pBase;
Now if I verify that:
dynamic_cast<Child*>(qBase) != 0
and I have a lot of dereferencing to do, I
imagine that the code would be faster in I use,
for example:
Thing thing = reinterpret_cast<Child*>(qBase)->getThing();
instead of the usual dynamic_cast.
Is this correct?
Thanks,
Mike.
{
....
}
class Child : public BASE
{
public:
Thing& getThing();
....
}
Base* pBase = new Child;
Base* qBase = pBase;
Now if I verify that:
dynamic_cast<Child*>(qBase) != 0
and I have a lot of dereferencing to do, I
imagine that the code would be faster in I use,
for example:
Thing thing = reinterpret_cast<Child*>(qBase)->getThing();
instead of the usual dynamic_cast.
Is this correct?
Thanks,
Mike.