Skip to content

Commit e59aeb9

Browse files
committed
Implement review feedback
1 parent 93473c7 commit e59aeb9

2 files changed

Lines changed: 18 additions & 16 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ override CFLAGS += $(_CFLAGS) $(DEFINES) $(INCLUDES) \
128128
### The object files (add further files here):
129129

130130
OBJS = $(PLUGIN).o audio.o buf2rgb.o codec_audio.o codec_video.o config.o drmbuffer.o drmdevice.o drmplane.o grab.o h264parser.o \
131-
logger.o mediaplayer.o ringbuffer.o softhddevice.o softhdmenu.o softhdosd.o threads.o videorender.o videostream.o queue.o
131+
logger.o mediaplayer.o queue.o ringbuffer.o softhddevice.o softhdmenu.o softhdosd.o threads.o videorender.o videostream.o
132132

133133
ifeq ($(GLES),1)
134134
OBJS += openglosd.o

queue.cpp

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
*****************************************************************************/
3434

3535
/**
36-
* @brief Push an element to the front of the queue
36+
* Push an element to the front of the queue
3737
*
38-
* @tparam T Element type
39-
* @param element The element to push
38+
* @tparam T Element type
39+
* @param element The element to push
4040
* @return true if successfully pushed, false if queue is full
4141
*/
4242
template <typename T>
@@ -54,10 +54,10 @@ bool cQueue<T>::Push(const T& element)
5454
}
5555

5656
/**
57-
* @brief Pop an element from the back of the queue
57+
* Pop an element from the back of the queue
5858
*
59-
* @tparam T Element type
60-
* @return T The popped element
59+
* @tparam T Element type
60+
* @return T The popped element
6161
* @throws std::runtime_error if queue is empty
6262
*/
6363
template <typename T>
@@ -76,10 +76,10 @@ T cQueue<T>::Pop(void)
7676
}
7777

7878
/**
79-
* @brief Get a reference to the front element
79+
* Get a reference to the front element
8080
*
81-
* @tparam T Element type
82-
* @return T& Reference to the front (most recently pushed) element
81+
* @tparam T Element type
82+
* @return T Element at the front (most recently pushed)
8383
* @throws std::runtime_error if queue is empty
8484
*/
8585
template <typename T>
@@ -95,10 +95,10 @@ T cQueue<T>::Head(void)
9595
}
9696

9797
/**
98-
* @brief Get a reference to the back element
98+
* Get a reference to the back element
9999
*
100-
* @tparam T Element type
101-
* @return T& Reference to the back (next to be popped) element
100+
* @tparam T Element type
101+
* @return T Element at the back (next to be popped)
102102
* @throws std::runtime_error if queue is empty
103103
*/
104104
template <typename T>
@@ -114,7 +114,7 @@ T cQueue<T>::Peek(void)
114114
}
115115

116116
/**
117-
* @brief Check if the queue is empty
117+
* Check if the queue is empty
118118
*
119119
* @tparam T Element type
120120
* @return true if queue is empty, false otherwise
@@ -123,19 +123,21 @@ template <typename T>
123123
bool cQueue<T>::Empty(void)
124124
{
125125
std::lock_guard<std::mutex> lock(m_mutex);
126+
126127
return m_deque.empty();
127128
}
128129

129130
/**
130-
* @brief Get the current size of the queue
131+
* Get the current size of the queue
131132
*
132133
* @tparam T Element type
133-
* @return size_t Number of elements currently in the queue
134+
* @return Number of elements currently in the queue
134135
*/
135136
template <typename T>
136137
size_t cQueue<T>::Size(void)
137138
{
138139
std::lock_guard<std::mutex> lock(m_mutex);
140+
139141
return m_deque.size();
140142
}
141143

0 commit comments

Comments
 (0)