From f6898c10ce577347c12502dc5dc9cf7c6b89b148 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 22 Mar 2023 09:38:04 +0100 Subject: [PATCH] Remove unnecessary re-creation of data buffers --- python/templates/SIOBlock.cc.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/templates/SIOBlock.cc.jinja2 b/python/templates/SIOBlock.cc.jinja2 index 0ed56ef45..f8090ea75 100644 --- a/python/templates/SIOBlock.cc.jinja2 +++ b/python/templates/SIOBlock.cc.jinja2 @@ -25,8 +25,8 @@ void {{ block_class }}::read(sio::read_device& device, sio::version_type version if (not m_subsetColl) { unsigned size(0); device.data( size ); - m_buffers.data = new std::vector<{{ class.full_type }}Data>(size); auto* dataVec = m_buffers.dataAsVector<{{ class.full_type }}Data>(); + dataVec->resize(size); podio::handlePODDataSIO(device, dataVec->data(), size); }