Skip to content

Commit

Permalink
Refs #21137. Apply review suggestions.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Jun 26, 2024
1 parent df98382 commit 9a741c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
17 changes: 16 additions & 1 deletion include/fastdds/rtps/history/WriterHistory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,30 @@ class WriterHistory : public rtps::History
public:

/**
* Constructor of the WriterHistory.
* @brief Construct a WriterHistory.
*
* @param att Attributes configuring the WriterHistory.
*/
FASTDDS_EXPORTED_API WriterHistory(
const HistoryAttributes& att);

/**
* @brief Construct a WriterHistory with a custom payload pool.
*
* @param att Attributes configuring the WriterHistory.
* @param payload_pool Pool of payloads to be used by the WriterHistory.
*/
FASTDDS_EXPORTED_API WriterHistory(
const HistoryAttributes& att,
const std::shared_ptr<IPayloadPool>& payload_pool);

/**
* @brief Construct a WriterHistory with custom payload and change pools.
*
* @param att Attributes configuring the WriterHistory.
* @param payload_pool Pool of payloads to be used by the WriterHistory.
* @param change_pool Pool of changes to be used by the WriterHistory.
*/
FASTDDS_EXPORTED_API WriterHistory(
const HistoryAttributes& att,
const std::shared_ptr<IPayloadPool>& payload_pool,
Expand Down
3 changes: 1 addition & 2 deletions src/cpp/rtps/history/WriterHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ WriterHistory::WriterHistory(
const HistoryAttributes& att,
const std::shared_ptr<IPayloadPool>& payload_pool)
: History(att)
, change_pool_(std::make_shared<CacheChangePool>(PoolConfig::from_history_attributes(att)))
, payload_pool_(payload_pool)
{
PoolConfig cfg = PoolConfig::from_history_attributes(att);
change_pool_ = std::make_shared<CacheChangePool>(cfg);
}

WriterHistory::WriterHistory(
Expand Down

0 comments on commit 9a741c2

Please sign in to comment.