diff --git a/fairmq/MemoryResourceTools.h b/fairmq/MemoryResourceTools.h index 5578125c1..adbc73b92 100644 --- a/fairmq/MemoryResourceTools.h +++ b/fairmq/MemoryResourceTools.h @@ -66,7 +66,7 @@ FairMQMessagePtr getMessage(ContainerT &&container_, FairMQMemoryResource *targe /// Resource must be kept alive throughout the lifetime of the /// container and associated message. template -std::vector> adoptVector( +std::vector> getVector( size_t nelem, SpectatorMessageResource *resource) { @@ -78,7 +78,7 @@ std::vector std::vector> - adoptVector(size_t nelem, FairMQMessagePtr message) + getVector(size_t nelem, FairMQMessagePtr message) { return std::vector>( nelem, @@ -93,7 +93,7 @@ std::vector> // semantics for access. // use auto or decltype to catch the return type. // template -// auto adoptVector(size_t nelem, FairMQMessage* message) +// auto getVector(size_t nelem, FairMQMessage* message) //{ // using DataType = std::vector; // diff --git a/test/memory_resources/_memory_resources.cxx b/test/memory_resources/_memory_resources.cxx index 84a12b63b..c710364cb 100644 --- a/test/memory_resources/_memory_resources.cxx +++ b/test/memory_resources/_memory_resources.cxx @@ -166,7 +166,7 @@ TEST(MemoryResources, adoptVector_test) std::memcpy(message->GetData(), tmpBuf, 3 * sizeof(testData)); auto adoptedOwner = - adoptVector(3, std::move(message)); + getVector(3, std::move(message)); EXPECT_TRUE(adoptedOwner[0].i == 3); EXPECT_TRUE(adoptedOwner[1].i == 2); EXPECT_TRUE(adoptedOwner[2].i == 1);