X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacketImpl.cti;h=1f2d79a74a8394f8e7e694697a7987e663fea3ad;hb=b89e3166f7680755683dccee5e48cb3a820185c0;hp=21956f18c3c105298179e0d5abdebf987aa188ce;hpb=9348e1098d66ac2684c8e280abf8d7143c887982;p=senf.git diff --git a/Packets/PacketImpl.cti b/Packets/PacketImpl.cti index 21956f1..1f2d79a 100644 --- a/Packets/PacketImpl.cti +++ b/Packets/PacketImpl.cti @@ -50,20 +50,18 @@ prefix_ unsigned senf::detail::AnnotationIndexer::index() // senf::detail::GetAnnotation template -prefix_ Annotation & senf::detail::GetAnnotation::get(AnnotationP * & p) +prefix_ Annotation & senf::detail::GetAnnotation::get(AnnotationEntry & e) { - if (!p) - p = new TAnnotationP(); - return static_cast< TAnnotationP* >(p)->annotation; + if (!e.p) + e.p = new TAnnotationP(); + return static_cast< TAnnotationP* >(e.p)->annotation; } -/* template -prefix_ Annotation & senf::detail::GetAnnotation::get(AnnotationP * & p) +prefix_ Annotation & senf::detail::GetAnnotation::get(AnnotationEntry & e) { - return * reinterpret_cast(p); + return * static_cast(static_cast(& e.i)); } -*/ /////////////////////////////////////////////////////////////////////////// // senf::detail::PacketImpl @@ -81,7 +79,7 @@ prefix_ void senf::detail::PacketImpl::insert(PacketData * self, iterator pos, F template prefix_ senf::detail::PacketImpl::PacketImpl(InputIterator first, InputIterator last) - : refcount_(0), data_(first,last), annotations_(AnnotationIndexerBase::maxAnnotations, 0) + : refcount_(0), data_(first,last), annotations_(AnnotationIndexerBase::maxAnnotations) {} // Annotations