summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-12-21 17:00:30 +0200
committerTor Lillqvist <tml@collabora.com>2015-12-21 17:09:23 +0200
commit6fe4ae9ae383d291c130c51ed7e0b69c3ee9ddb0 (patch)
treeb135e4a02eab346dec56fe2889a8e3403d8741d0
parentac2bccd45b770db5f6cbe4abab1ba2f473e893b6 (diff)
These functions can be void
The return values are ignored. Change-Id: Ieac07150b5cd93c32c9985e548203716c56e8700
-rw-r--r--vcl/inc/sallayout.hxx12
-rw-r--r--vcl/source/gdi/sallayout.cxx14
2 files changed, 12 insertions, 14 deletions
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index cf7d53ff5543..7907f69e2bf4 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -57,8 +57,8 @@ public:
ImplLayoutRuns() { mnRunIndex = 0; maRuns.reserve(8); }
void Clear() { maRuns.clear(); }
- bool AddPos( int nCharPos, bool bRTL );
- bool AddRun( int nMinRunPos, int nEndRunPos, bool bRTL );
+ void AddPos( int nCharPos, bool bRTL );
+ void AddRun( int nMinRunPos, int nEndRunPos, bool bRTL );
bool IsEmpty() const { return maRuns.empty(); }
void ResetPos() { mnRunIndex = 0; }
@@ -106,10 +106,10 @@ public:
bool GetNextPos( int* nCharPos, bool* bRTL )
{ return maRuns.GetNextPos( nCharPos, bRTL ); }
bool GetNextRun( int* nMinRunPos, int* nEndRunPos, bool* bRTL );
- bool NeedFallback( int nCharPos, bool bRTL )
- { return maFallbackRuns.AddPos( nCharPos, bRTL ); }
- bool NeedFallback( int nMinRunPos, int nEndRunPos, bool bRTL )
- { return maFallbackRuns.AddRun( nMinRunPos, nEndRunPos, bRTL ); }
+ void NeedFallback( int nCharPos, bool bRTL )
+ { maFallbackRuns.AddPos( nCharPos, bRTL ); }
+ void NeedFallback( int nMinRunPos, int nEndRunPos, bool bRTL )
+ { maFallbackRuns.AddRun( nMinRunPos, nEndRunPos, bRTL ); }
// methods used by BiDi and glyph fallback
bool NeedFallback() const
{ return !maFallbackRuns.IsEmpty(); }
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 570980299da3..9d45ff2703d3 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -281,7 +281,7 @@ inline bool IsControlChar( sal_UCS4 cChar )
return false;
}
-bool ImplLayoutRuns::AddPos( int nCharPos, bool bRTL )
+void ImplLayoutRuns::AddPos( int nCharPos, bool bRTL )
{
// check if charpos could extend current run
int nIndex = maRuns.size();
@@ -293,25 +293,24 @@ bool ImplLayoutRuns::AddPos( int nCharPos, bool bRTL )
{
// extend current run by new charpos
maRuns[ nIndex-1 ] = nCharPos + int(!bRTL);
- return false;
+ return;
}
// ignore new charpos when it is in current run
if( (nRunPos0 <= nCharPos) && (nCharPos < nRunPos1) )
- return false;
+ return;
if( (nRunPos1 <= nCharPos) && (nCharPos < nRunPos0) )
- return false;
+ return;
}
// else append a new run consisting of the new charpos
maRuns.push_back( nCharPos + (bRTL ? 1 : 0) );
maRuns.push_back( nCharPos + (bRTL ? 0 : 1) );
- return true;
}
-bool ImplLayoutRuns::AddRun( int nCharPos0, int nCharPos1, bool bRTL )
+void ImplLayoutRuns::AddRun( int nCharPos0, int nCharPos1, bool bRTL )
{
if( nCharPos0 == nCharPos1 )
- return false;
+ return;
// swap if needed
if( bRTL == (nCharPos0 < nCharPos1) )
@@ -324,7 +323,6 @@ bool ImplLayoutRuns::AddRun( int nCharPos0, int nCharPos1, bool bRTL )
// append new run
maRuns.push_back( nCharPos0 );
maRuns.push_back( nCharPos1 );
- return true;
}
bool ImplLayoutRuns::PosIsInRun( int nCharPos ) const