mirror of https://github.com/Icinga/icinga2.git
Remove unused Stream#Peek()
This commit is contained in:
parent
66b039df9c
commit
78b4dc6509
|
@ -54,19 +54,6 @@ void FIFO::Optimize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t FIFO::Peek(void *buffer, size_t count, bool allow_partial)
|
|
||||||
{
|
|
||||||
ASSERT(allow_partial);
|
|
||||||
|
|
||||||
if (count > m_DataSize)
|
|
||||||
count = m_DataSize;
|
|
||||||
|
|
||||||
if (buffer)
|
|
||||||
std::memcpy(buffer, m_Buffer + m_Offset, count);
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements IOQueue::Read.
|
* Implements IOQueue::Read.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -23,7 +23,6 @@ public:
|
||||||
|
|
||||||
~FIFO() override;
|
~FIFO() override;
|
||||||
|
|
||||||
size_t Peek(void *buffer, size_t count, bool allow_partial = false) override;
|
|
||||||
size_t Read(void *buffer, size_t count, bool allow_partial = false) override;
|
size_t Read(void *buffer, size_t count, bool allow_partial = false) override;
|
||||||
void Write(const void *buffer, size_t count) override;
|
void Write(const void *buffer, size_t count) override;
|
||||||
void Close() override;
|
void Close() override;
|
||||||
|
|
|
@ -29,11 +29,6 @@ void Stream::Shutdown()
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Stream does not support Shutdown()."));
|
BOOST_THROW_EXCEPTION(std::runtime_error("Stream does not support Shutdown()."));
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t Stream::Peek(void *buffer, size_t count, bool allow_partial)
|
|
||||||
{
|
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Stream does not support Peek()."));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Stream::SignalDataAvailable()
|
void Stream::SignalDataAvailable()
|
||||||
{
|
{
|
||||||
OnDataAvailable(this);
|
OnDataAvailable(this);
|
||||||
|
|
|
@ -54,17 +54,6 @@ class Stream : public Object
|
||||||
public:
|
public:
|
||||||
DECLARE_PTR_TYPEDEFS(Stream);
|
DECLARE_PTR_TYPEDEFS(Stream);
|
||||||
|
|
||||||
/**
|
|
||||||
* Reads data from the stream without removing it from the stream buffer.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer where data should be stored. May be nullptr if you're
|
|
||||||
* not actually interested in the data.
|
|
||||||
* @param count The number of bytes to read from the queue.
|
|
||||||
* @param allow_partial Whether to allow partial reads.
|
|
||||||
* @returns The number of bytes actually read.
|
|
||||||
*/
|
|
||||||
virtual size_t Peek(void *buffer, size_t count, bool allow_partial = false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads data from the stream.
|
* Reads data from the stream.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue