Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
RichLogan committed Aug 23, 2024
1 parent 22c7dbd commit 4207ac5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/transport/priority_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace qtransport {
class PriorityQueue
{
using TimeType = std::chrono::milliseconds;
using TimeQueueUs = TimeQueue<DataType, TimeType>;
using TimeQueueType = TimeQueue<DataType, TimeType>;

struct Exception : public std::runtime_error
{
Expand Down Expand Up @@ -197,14 +197,14 @@ namespace qtransport {
*
* @return Unique pointer to queue for the given priority
*/
std::unique_ptr<TimeQueueUs>& GetQueueByPriority(const uint8_t priority)
std::unique_ptr<TimeQueueType>& GetQueueByPriority(const uint8_t priority)
{
if (priority >= PMAX) {
throw InvalidPriorityException("Priority not within range");
}

if (!queue_[priority]) {
queue_[priority] = std::make_unique<TimeQueueUs>(duration_ms_, interval_ms_, tick_service_, initial_queue_size_);
queue_[priority] = std::make_unique<TimeQueueType>(duration_ms_, interval_ms_, tick_service_, initial_queue_size_);
}

return queue_[priority];
Expand All @@ -215,7 +215,7 @@ namespace qtransport {
size_t duration_ms_;
size_t interval_ms_;

std::array<std::unique_ptr<TimeQueueUs>, PMAX> queue_;
std::array<std::unique_ptr<TimeQueueType>, PMAX> queue_;
std::shared_ptr<TickService> tick_service_;
};
}; // end of namespace qtransport
}; // end of namespace qtransport

0 comments on commit 4207ac5

Please sign in to comment.