From 37a6bafea8416541d7d250d66a9e951400b197a3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 4 Mar 2016 14:51:52 +0200 Subject: loplugin:unuseddefaultparam in various Change-Id: I03d7381aad055cbe9bd905e4082586073f4112e0 Reviewed-on: https://gerrit.libreoffice.org/22900 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/inc/iosys.hxx | 2 +- basic/source/runtime/iosys.cxx | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'basic') diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx index 0902407b71f8..151bdf11d6b7 100644 --- a/basic/source/inc/iosys.hxx +++ b/basic/source/inc/iosys.hxx @@ -64,7 +64,7 @@ public: SbError Close(); SbError Read(OString&, sal_uInt16 = 0, bool bForceReadingPerByte=false); SbError Read( char& ); - SbError Write( const OString&, sal_uInt16 = 0 ); + SbError Write( const OString& ); bool IsText() const { return !bool(nMode & SbiStreamFlags::Binary); } bool IsRandom() const { return bool(nMode & SbiStreamFlags::Random); } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index e7c890838888..46c90bed8386 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -715,7 +715,7 @@ namespace } } -SbError SbiStream::Write( const OString& rBuf, sal_uInt16 n ) +SbError SbiStream::Write( const OString& rBuf ) { ExpandFile(); if( IsAppend() ) @@ -741,15 +741,11 @@ SbError SbiStream::Write( const OString& rBuf, sal_uInt16 n ) } else { - if( !n ) - { - n = nLen; - } - if( !n ) + if( !nLen ) { return nError = ERRCODE_BASIC_BAD_RECORD_LENGTH; } - pStrm->Write(rBuf.getStr(), n); + pStrm->Write(rBuf.getStr(), nLen); MapError(); } return nError; -- cgit