Kaydet (Commit) a784ac2d authored tarafından Mike Kaganski's avatar Mike Kaganski

loplugin:unusedindex

Change-Id: I80c0a8dbfda14e54fcfaf33a241c83bad8495db1
Reviewed-on: https://gerrit.libreoffice.org/46833Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 4e124b17
......@@ -63,28 +63,18 @@ COMPHELPER_DLLPUBLIC const css::uno::Reference<css::io::XObjectOutputStream>& op
template <class ELEMENT>
const css::uno::Reference<css::io::XObjectInputStream>& operator >> (const css::uno::Reference<css::io::XObjectInputStream>& _rxInStream, css::uno::Sequence<ELEMENT>& _rSeq)
{
sal_Int32 nLen = _rxInStream->readLong();
_rSeq.realloc(nLen);
if (nLen)
{
ELEMENT* pElement = _rSeq.getArray();
for (sal_Int32 i=0; i<nLen; ++i, ++pElement)
_rxInStream >> *pElement;
}
_rSeq.realloc(_rxInStream->readLong());
for (ELEMENT& rElement : _rSeq)
_rxInStream >> rElement;
return _rxInStream;
}
template <class ELEMENT>
const css::uno::Reference<css::io::XObjectOutputStream>& operator << (const css::uno::Reference<css::io::XObjectOutputStream>& _rxOutStream, const css::uno::Sequence<ELEMENT>& _rSeq)
{
sal_Int32 nLen = _rSeq.getLength();
_rxOutStream->writeLong(nLen);
if (nLen)
{
const ELEMENT* pElement = _rSeq.getConstArray();
for (sal_Int32 i = 0; i < nLen; ++i, ++pElement)
_rxOutStream << *pElement;
}
_rxOutStream->writeLong(_rSeq.getLength());
for (const ELEMENT& rElement : _rSeq)
_rxOutStream << rElement;
return _rxOutStream;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment