Removes unneccessary num_available_packets() API. (#108)

master
Damon Kohler 2016-10-27 13:06:49 +02:00 committed by GitHub
parent 224b068fe9
commit a33bddd4cd
2 changed files with 0 additions and 15 deletions

View File

@ -79,16 +79,6 @@ class Collator {
queue_.Flush(); queue_.Flush();
} }
// Returns the number of packets associated with 'trajectory_id' that are
// available for processing.
int num_available_packets(const int trajectory_id) {
int num = std::numeric_limits<int>::max();
for (const auto& queue_key : queue_keys_[trajectory_id]) {
num = std::min(num, queue_.num_available(queue_key));
}
return num;
}
private: private:
// Queue keys are a pair of trajectory ID and sensor identifier. // Queue keys are a pair of trajectory ID and sensor identifier.
OrderedMultiQueue queue_; OrderedMultiQueue queue_;

View File

@ -105,11 +105,6 @@ class OrderedMultiQueue {
} }
} }
// Returns the number of available values associated with 'queue_key'.
int num_available(const QueueKey& queue_key) {
return FindOrDie(queue_key).queue.Size();
}
private: private:
struct Queue { struct Queue {
common::BlockingQueue<std::unique_ptr<Data>> queue; common::BlockingQueue<std::unique_ptr<Data>> queue;