diff options
Diffstat (limited to 'xmlscript/source/xml_helper')
-rw-r--r-- | xmlscript/source/xml_helper/xml_byteseq.cxx | 2 | ||||
-rw-r--r-- | xmlscript/source/xml_helper/xml_element.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/xmlscript/source/xml_helper/xml_byteseq.cxx b/xmlscript/source/xml_helper/xml_byteseq.cxx index 5291dfbd5187..e0d5ec272466 100644 --- a/xmlscript/source/xml_helper/xml_byteseq.cxx +++ b/xmlscript/source/xml_helper/xml_byteseq.cxx @@ -56,7 +56,7 @@ public: sal_Int32 BSeqInputStream::readBytes( Sequence< sal_Int8 > & rData, sal_Int32 nBytesToRead ) { - nBytesToRead = ((nBytesToRead > (sal_Int32)_seq.size() - _nPos) + nBytesToRead = ((nBytesToRead > static_cast<sal_Int32>(_seq.size()) - _nPos) ? _seq.size() - _nPos : nBytesToRead); diff --git a/xmlscript/source/xml_helper/xml_element.cxx b/xmlscript/source/xml_helper/xml_element.cxx index 02bfdc98245e..c0f4286ab5c6 100644 --- a/xmlscript/source/xml_helper/xml_element.cxx +++ b/xmlscript/source/xml_helper/xml_element.cxx @@ -39,7 +39,7 @@ void XMLElement::addSubElement( Reference< xml::sax::XAttributeList > const & xE Reference< xml::sax::XAttributeList > const & XMLElement::getSubElement( sal_Int32 nIndex ) { - return _subElems[ (size_t)nIndex ]; + return _subElems[ static_cast<size_t>(nIndex) ]; } void XMLElement::dumpSubElements( Reference< xml::sax::XDocumentHandler > const & xOut ) @@ -69,13 +69,13 @@ sal_Int16 XMLElement::getLength() OUString XMLElement::getNameByIndex( sal_Int16 nPos ) { - OSL_ASSERT( (size_t)nPos < _attrNames.size() ); + OSL_ASSERT( static_cast<size_t>(nPos) < _attrNames.size() ); return _attrNames[ nPos ]; } OUString XMLElement::getTypeByIndex( sal_Int16 nPos ) { - OSL_ASSERT( (size_t)nPos < _attrNames.size() ); + OSL_ASSERT( static_cast<size_t>(nPos) < _attrNames.size() ); // xxx todo return OUString(); } @@ -88,7 +88,7 @@ OUString XMLElement::getTypeByName( OUString const & /*rName*/ ) OUString XMLElement::getValueByIndex( sal_Int16 nPos ) { - OSL_ASSERT( (size_t)nPos < _attrNames.size() ); + OSL_ASSERT( static_cast<size_t>(nPos) < _attrNames.size() ); return _attrValues[ nPos ]; } |