Skip to content

Commit d2cacd9

Browse files
committed
Refs #21137. Apply review suggestions.
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
1 parent eac5c13 commit d2cacd9

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

include/fastdds/rtps/history/WriterHistory.hpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,30 @@ class WriterHistory : public rtps::History
5858
public:
5959

6060
/**
61-
* Constructor of the WriterHistory.
61+
* @brief Construct a WriterHistory.
62+
*
63+
* @param att Attributes configuring the WriterHistory.
6264
*/
6365
FASTDDS_EXPORTED_API WriterHistory(
6466
const HistoryAttributes& att);
6567

68+
/**
69+
* @brief Construct a WriterHistory with a custom payload pool.
70+
*
71+
* @param att Attributes configuring the WriterHistory.
72+
* @param payload_pool Pool of payloads to be used by the WriterHistory.
73+
*/
6674
FASTDDS_EXPORTED_API WriterHistory(
6775
const HistoryAttributes& att,
6876
const std::shared_ptr<IPayloadPool>& payload_pool);
6977

78+
/**
79+
* @brief Construct a WriterHistory with custom payload and change pools.
80+
*
81+
* @param att Attributes configuring the WriterHistory.
82+
* @param payload_pool Pool of payloads to be used by the WriterHistory.
83+
* @param change_pool Pool of changes to be used by the WriterHistory.
84+
*/
7085
FASTDDS_EXPORTED_API WriterHistory(
7186
const HistoryAttributes& att,
7287
const std::shared_ptr<IPayloadPool>& payload_pool,

src/cpp/rtps/history/WriterHistory.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ WriterHistory::WriterHistory(
8787
const HistoryAttributes& att,
8888
const std::shared_ptr<IPayloadPool>& payload_pool)
8989
: History(att)
90+
, change_pool_(std::make_shared<CacheChangePool>(PoolConfig::from_history_attributes(att)))
9091
, payload_pool_(payload_pool)
9192
{
92-
PoolConfig cfg = PoolConfig::from_history_attributes(att);
93-
change_pool_ = std::make_shared<CacheChangePool>(cfg);
9493
}
9594

9695
WriterHistory::WriterHistory(

0 commit comments

Comments
 (0)