repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: check whether the initiator is valid in CCECProcessor::ParseCommand(). fixes...
[deb_libcec.git]
/
src
/
lib
/
util
/
buffer.h
diff --git
a/src/lib/util/buffer.h
b/src/lib/util/buffer.h
index d49de62554ea7ea8305c1c810ce2809d8f2228eb..ded4001dac43586d92fac960938de629195f6b65 100644
(file)
--- a/
src/lib/util/buffer.h
+++ b/
src/lib/util/buffer.h
@@
-44,7
+44,17
@@
namespace CEC
{
m_maxSize = iMaxSize;
}
{
m_maxSize = iMaxSize;
}
- virtual ~CecBuffer(void) {}
+
+ virtual ~CecBuffer(void)
+ {
+ Clear();
+ }
+
+ void Clear(void)
+ {
+ while (!m_buffer.empty())
+ m_buffer.pop();
+ }
int Size(void) const { return m_buffer.size(); }
int Size(void) const { return m_buffer.size(); }
@@
-62,7
+72,7
@@
namespace CEC
{
bool bReturn(false);
CLockObject lock(&m_mutex);
{
bool bReturn(false);
CLockObject lock(&m_mutex);
- if (
m_buffer.size() > 0
)
+ if (
!m_buffer.empty()
)
{
entry = m_buffer.front();
m_buffer.pop();
{
entry = m_buffer.front();
m_buffer.pop();