Packet: optimized Packet.is<> member by removing dynamic_cast
[senf.git] / senf / Packets / PacketInterpreter.cti
index bafdf9e..459580b 100644 (file)
 // Interpreter chain access
 
 template <class Type>
-prefix_ bool senf::PacketInterpreterBase::is()
-{
-    // ensure that the template argument is included in the corresponding object file when linking:
-    { static typename PacketInterpreter<Type>::factory_t _ (PacketInterpreter<Type>::factory()); (void) _;}
-    return dynamic_cast< PacketInterpreter<Type>* >(this);
-}
-
-template <class Type>
 prefix_ typename senf::PacketInterpreter<Type>::ptr senf::PacketInterpreterBase::as()
 {
     // ensure that the template argument is included in the corresponding object file when linking: