senf::PacketInterpreter<PacketType>::create(size_type size, senf::NoInit_t)
{
detail::PacketImpl::Guard p (new detail::PacketImpl(size,0));
- ptr pi (create(p.p,p.p->begin(),p.p->end(),Append));
- return pi;
+ return create(p.p,p.p->begin(),p.p->end(),Append);
}
// Create packet as new packet after a given packet
template <class PacketType>
prefix_ typename senf::PacketInterpreter<PacketType>::ptr
-senf::PacketInterpreter<PacketType>::createAfter(PacketInterpreterBase::ptr packet,
+senf::PacketInterpreter<PacketType>::createAfter(PacketInterpreterBase::ptr const & packet,
size_type size)
{
if (size < initSize())
template <class PacketType>
prefix_ typename senf::PacketInterpreter<PacketType>::ptr
-senf::PacketInterpreter<PacketType>::createAfter(PacketInterpreterBase::ptr packet,
+senf::PacketInterpreter<PacketType>::createAfter(PacketInterpreterBase::ptr const & packet,
size_type size, senf::NoInit_t)
{
optional_range r (packet->nextPacketRange());
template <class PacketType>
template <class ForwardReadableRange>
prefix_ typename senf::PacketInterpreter<PacketType>::ptr
-senf::PacketInterpreter<PacketType>::createAfter(PacketInterpreterBase::ptr packet,
+senf::PacketInterpreter<PacketType>::createAfter(PacketInterpreterBase::ptr const & packet,
ForwardReadableRange const & range)
{
optional_range r (packet->nextPacketRange());
template <class PacketType>
prefix_ typename senf::PacketInterpreter<PacketType>::ptr
-senf::PacketInterpreter<PacketType>::createBefore(PacketInterpreterBase::ptr packet)
+senf::PacketInterpreter<PacketType>::createBefore(PacketInterpreterBase::ptr const & packet)
{
ptr pi (createBefore(packet, senf::noinit));
pi->data().insert(pi->data().begin(),initHeadSize(),byte(0x00u));
template <class PacketType>
prefix_ typename senf::PacketInterpreter<PacketType>::ptr
-senf::PacketInterpreter<PacketType>::createBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t)
+senf::PacketInterpreter<PacketType>::createBefore(PacketInterpreterBase::ptr const & packet, senf::NoInit_t)
{
if (packet->prev())
packet->impl().truncateInterpretersBackwards(packet->prev().get());
template <class PacketType>
prefix_ typename senf::PacketInterpreter<PacketType>::ptr
-senf::PacketInterpreter<PacketType>::createInsertBefore(PacketInterpreterBase::ptr packet)
+senf::PacketInterpreter<PacketType>::createInsertBefore(PacketInterpreterBase::ptr const & packet)
{
ptr pi (createInsertBefore(packet, senf::noinit));
pi->data().insert(pi->data().begin(),initHeadSize(),byte(0x00u));
template <class PacketType>
prefix_ typename senf::PacketInterpreter<PacketType>::ptr
-senf::PacketInterpreter<PacketType>::createInsertBefore(PacketInterpreterBase::ptr packet,
+senf::PacketInterpreter<PacketType>::createInsertBefore(PacketInterpreterBase::ptr const & packet,
senf::NoInit_t)
{
return create(&packet->impl(),packet->data().begin(),packet->data().end(),packet);
template <class ForwardReadableRange>
prefix_ senf::PacketInterpreterBase::ptr
-senf::PacketInterpreterBase::Factory::createAfter(PacketInterpreterBase::ptr packet,
+senf::PacketInterpreterBase::Factory::createAfter(PacketInterpreterBase::ptr const & packet,
ForwardReadableRange const & range)
const
{
template <class PacketType>
prefix_ typename senf::PacketInterpreterBase::ptr
-senf::PacketInterpreter<PacketType>::FactoryImpl::createAfter(PacketInterpreterBase::ptr packet)
+senf::PacketInterpreter<PacketType>::FactoryImpl::createAfter(PacketInterpreterBase::ptr const & packet)
const
{
return senf::PacketInterpreter<PacketType>::createAfter(packet);
template <class PacketType>
prefix_ typename senf::PacketInterpreterBase::ptr
-senf::PacketInterpreter<PacketType>::FactoryImpl::createAfter(PacketInterpreterBase::ptr packet,
+senf::PacketInterpreter<PacketType>::FactoryImpl::createAfter(PacketInterpreterBase::ptr const & packet,
senf::NoInit_t)
const
{
template <class PacketType>
prefix_ typename senf::PacketInterpreterBase::ptr
-senf::PacketInterpreter<PacketType>::FactoryImpl::createAfter(PacketInterpreterBase::ptr packet,
+senf::PacketInterpreter<PacketType>::FactoryImpl::createAfter(PacketInterpreterBase::ptr const & packet,
size_type size)
const
{
template <class PacketType>
prefix_ typename senf::PacketInterpreterBase::ptr
-senf::PacketInterpreter<PacketType>::FactoryImpl::createAfter(PacketInterpreterBase::ptr packet,
+senf::PacketInterpreter<PacketType>::FactoryImpl::createAfter(PacketInterpreterBase::ptr const & packet,
size_type size, senf::NoInit_t)
const
{
template <class PacketType>
prefix_ typename senf::PacketInterpreterBase::ptr
senf::PacketInterpreter<PacketType>::FactoryImpl::
-createBefore(PacketInterpreterBase::ptr packet)
+createBefore(PacketInterpreterBase::ptr const & packet)
const
{
return senf::PacketInterpreter<PacketType>::createBefore(packet);
template <class PacketType>
prefix_ senf::PacketInterpreterBase::ptr
senf::PacketInterpreter<PacketType>::FactoryImpl::
-createBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t)
+createBefore(PacketInterpreterBase::ptr const & packet, senf::NoInit_t)
const
{
return senf::PacketInterpreter<PacketType>::createBefore(packet,senf::noinit);
template <class PacketType>
prefix_ senf::PacketInterpreterBase::ptr
senf::PacketInterpreter<PacketType>::FactoryImpl::
-createInsertBefore(PacketInterpreterBase::ptr packet)
+createInsertBefore(PacketInterpreterBase::ptr const & packet)
const
{
return senf::PacketInterpreter<PacketType>::createInsertBefore(packet);
template <class PacketType>
prefix_ senf::PacketInterpreterBase::ptr
senf::PacketInterpreter<PacketType>::FactoryImpl::
-createInsertBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t)
+createInsertBefore(PacketInterpreterBase::ptr const & packet, senf::NoInit_t)
const
{
return senf::PacketInterpreter<PacketType>::createInsertBefore(packet,senf::noinit);
template <class PacketType>
prefix_ typename senf::PacketInterpreterBase::ptr
-senf::PacketInterpreter<PacketType>::FactoryImpl::parseNext(PacketInterpreterBase::ptr packet, PacketInterpreterBase::optional_range const & range)
+senf::PacketInterpreter<PacketType>::FactoryImpl::parseNext(PacketInterpreterBase::ptr const & packet, PacketInterpreterBase::optional_range const & range)
const
{
if (!range)