Kaydet (Commit) 49bc18c0 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constparams in i18nutil,sot

Change-Id: I8e91b11baa855b1049130746b34f53158010948b
Reviewed-on: https://gerrit.libreoffice.org/40050Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 89805d28
......@@ -57,7 +57,7 @@ static bool cased_letter(sal_Unicode ch)
// whenever there are more accents above.
#define accent_above(ch) (((ch) >= 0x0300 && (ch) <= 0x0314) || ((ch) >= 0x033D && (ch) <= 0x0344) || (ch) == 0x0346 || ((ch) >= 0x034A && (ch) <= 0x034C))
Mapping& casefolding::getConditionalValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, Locale& aLocale, MappingType nMappingType)
Mapping& casefolding::getConditionalValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, Locale const & aLocale, MappingType nMappingType)
{
switch(str[pos]) {
case 0x03a3:
......@@ -86,7 +86,7 @@ Mapping& casefolding::getConditionalValue(const sal_Unicode* str, sal_Int32 pos,
throw RuntimeException();
}
Mapping& casefolding::getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, Locale& aLocale, MappingType nMappingType)
Mapping& casefolding::getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, Locale const & aLocale, MappingType nMappingType)
{
static Mapping dummy = { 0, 1, { 0, 0, 0 } };
sal_Int16 address = CaseMappingIndex[str[pos] >> 8];
......@@ -130,7 +130,7 @@ is_ja_voice_sound_mark(sal_Unicode& current, sal_Unicode next)
return c != 0;
}
sal_Unicode casefolding::getNextChar(const sal_Unicode *str, sal_Int32& idx, sal_Int32 len, MappingElement& e, Locale& aLocale, MappingType nMappingType, TransliterationFlags moduleLoaded)
sal_Unicode casefolding::getNextChar(const sal_Unicode *str, sal_Int32& idx, sal_Int32 len, MappingElement& e, Locale const & aLocale, MappingType nMappingType, TransliterationFlags moduleLoaded)
{
if( idx >= len )
{
......
......@@ -74,11 +74,11 @@ class I18NUTIL_DLLPUBLIC casefolding
{
public:
/// @throws css::uno::RuntimeException
static Mapping& getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, css::lang::Locale& aLocale, MappingType nMappingType);
static Mapping& getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, css::lang::Locale const & aLocale, MappingType nMappingType);
/// @throws css::uno::RuntimeException
static Mapping& getConditionalValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, css::lang::Locale& aLocale, MappingType nMappingType);
static Mapping& getConditionalValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, css::lang::Locale const & aLocale, MappingType nMappingType);
/// @throws css::uno::RuntimeException
static sal_Unicode getNextChar(const sal_Unicode *str, sal_Int32& idx, sal_Int32 len, MappingElement& e, css::lang::Locale& aLocale, MappingType nMappingtype, TransliterationFlags moduleLoaded);
static sal_Unicode getNextChar(const sal_Unicode *str, sal_Int32& idx, sal_Int32 len, MappingElement& e, css::lang::Locale const & aLocale, MappingType nMappingtype, TransliterationFlags moduleLoaded);
};
......
......@@ -319,7 +319,7 @@ public:
virtual bool Equals( const BaseStorage& rStream ) const override;
UCBStorageElement_Impl* FindElement_Impl( const OUString& rName ) const;
bool CopyStorageElement_Impl( UCBStorageElement_Impl& rElement,
bool CopyStorageElement_Impl( UCBStorageElement_Impl const & rElement,
BaseStorage* pDest, const OUString& rNew ) const;
BaseStorage* OpenStorage_Impl( const OUString & rEleName,
StreamMode, bool bDirect, bool bForceUCBStorage );
......
......@@ -33,7 +33,7 @@ StgAvlNode::~StgAvlNode()
delete m_pRight;
}
StgAvlNode* StgAvlNode::Find( StgAvlNode* pFind )
StgAvlNode* StgAvlNode::Find( StgAvlNode const * pFind )
{
if ( pFind )
{
......@@ -53,7 +53,7 @@ StgAvlNode* StgAvlNode::Find( StgAvlNode* pFind )
// +/0/- for >/=/< previous
short StgAvlNode::Locate
( StgAvlNode* pFind,
( StgAvlNode const * pFind,
StgAvlNode** pPivot, StgAvlNode **pParent, StgAvlNode** pPrev )
{
short nRes = 0;
......@@ -89,7 +89,7 @@ short StgAvlNode::Locate
// adjust balance factors in AVL tree from pivot down.
// Returns delta balance.
short StgAvlNode::Adjust( StgAvlNode** pHeavy, StgAvlNode* pNew )
short StgAvlNode::Adjust( StgAvlNode** pHeavy, StgAvlNode const * pNew )
{
StgAvlNode* pCur = this;
short nDelta;
......
......@@ -27,8 +27,8 @@ class StgAvlNode
{
friend class StgAvlIterator;
private:
short Locate( StgAvlNode*, StgAvlNode**, StgAvlNode**, StgAvlNode** );
short Adjust( StgAvlNode**, StgAvlNode* );
short Locate( StgAvlNode const *, StgAvlNode**, StgAvlNode**, StgAvlNode** );
short Adjust( StgAvlNode**, StgAvlNode const * );
StgAvlNode* RotLL();
StgAvlNode* RotLR();
StgAvlNode* RotRR();
......@@ -42,7 +42,7 @@ protected:
StgAvlNode();
public:
virtual ~StgAvlNode();
StgAvlNode* Find( StgAvlNode* );
StgAvlNode* Find( StgAvlNode const * );
static bool Insert( StgAvlNode**, StgAvlNode* );
static bool Remove( StgAvlNode**, StgAvlNode*, bool bDel );
virtual short Compare( const StgAvlNode* ) const = 0;
......
......@@ -353,7 +353,7 @@ bool StgCache::Read( sal_Int32 nPage, void* pBuf )
return Good();
}
bool StgCache::Write( sal_Int32 nPage, void* pBuf )
bool StgCache::Write( sal_Int32 nPage, void const * pBuf )
{
if( Good() )
{
......@@ -405,7 +405,7 @@ void StgCache::ResetError()
m_pStrm->ResetError();
}
void StgCache::MoveError( StorageBase& r )
void StgCache::MoveError( StorageBase const & r )
{
if( m_nError != ERRCODE_NONE )
{
......
......@@ -74,13 +74,13 @@ public:
void SetStrm( UCBStorageStream* );
bool Good() const { return m_nError == ERRCODE_NONE; }
ErrCode GetError() { return m_nError; }
void MoveError( StorageBase& );
void MoveError( StorageBase const & );
void SetError( ErrCode );
void ResetError();
bool Open( const OUString& rName, StreamMode );
void Close();
bool Read( sal_Int32 nPage, void* pBuf );
bool Write( sal_Int32 nPage, void* pBuf );
bool Write( sal_Int32 nPage, void const * pBuf );
// two routines for accessing FAT pages
// Assume that the data is a FAT page and get/put FAT data.
......
......@@ -980,7 +980,7 @@ sal_Int32 StgDataStrm::Write( const void* pBuf, sal_Int32 n )
}
else
// do a direct (unbuffered) write
nRes = (short) m_rIo.Write( m_nPage, const_cast<void*>(p) ) * m_nPageSize;
nRes = (short) m_rIo.Write( m_nPage, p ) * m_nPageSize;
}
else
{
......
......@@ -2412,7 +2412,7 @@ void UCBStorage::FillInfoList( SvStorageInfoList* pList ) const
}
}
bool UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, BaseStorage* pDest, const OUString& rNew ) const
bool UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl const & rElement, BaseStorage* pDest, const OUString& rNew ) const
{
// insert stream or storage into the list or stream of the destination storage
// not into the content, this will be done on commit !
......
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