Inlined function to avoid issues with dllimport on MSVC/Windows.

This commit is contained in:
Vincent Richard 2015-03-09 21:24:34 +01:00
parent 4b2f682f9d
commit 1b964969c5

View File

@ -242,33 +242,7 @@ public:
m_stream.reset(); m_stream.reset();
} }
size_t read(byte_t* const data, const size_t count); size_t read(byte_t* const data, const size_t count)
size_t skip(const size_t /* count */)
{
// Not supported
return 0;
}
private:
inputStream& m_stream;
const byte_t* m_sequence;
size_t m_found;
bool m_eof;
};
template <>
size_t stopSequenceFilteredInputStream <1>::read
(byte_t* const data, const size_t count);
template <int COUNT>
size_t stopSequenceFilteredInputStream <COUNT>::read
(byte_t* const data, const size_t count)
{ {
// Read buffer must be at least 'COUNT' size + 1 byte // Read buffer must be at least 'COUNT' size + 1 byte
if (eof() || count <= COUNT) if (eof() || count <= COUNT)
@ -403,6 +377,27 @@ size_t stopSequenceFilteredInputStream <COUNT>::read
return read; return read;
} }
size_t skip(const size_t /* count */)
{
// Not supported
return 0;
}
private:
inputStream& m_stream;
const byte_t* m_sequence;
size_t m_found;
bool m_eof;
};
template <>
size_t stopSequenceFilteredInputStream <1>::read
(byte_t* const data, const size_t count);
} // utility } // utility
} // vmime } // vmime