[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Mon Apr 3 13:36:04 UTC 2017


 sw/source/core/layout/laycache.cxx |    2 +-
 sw/source/core/layout/layhelp.hxx  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit dbaab58c1442e7f62ef0732376fe5a49840e9fd6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Apr 3 15:35:34 2017 +0200

    loplugin:loopvartoosmall
    
    Change-Id: Ief96de6eb6f6276681130a6d16c767ab8ceaa3f1

diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 65e8dcfc92d6..6b7d34b065a3 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -462,7 +462,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache,
     auto const nStartOfContent(rNodes.GetEndOfContent().StartOfSectionNode()->GetIndex());
     nNodeIndex -= nStartOfContent;
     auto const nMaxIndex(rNodes.GetEndOfContent().GetIndex() - nStartOfContent);
-    for (sal_uInt16 nIndex = 0; nIndex < rCache.size(); ++nIndex)
+    for (size_t nIndex = 0; nIndex < rCache.size(); ++nIndex)
     {
         auto const nBreakIndex(rCache.GetBreakIndex(nIndex));
         if (nBreakIndex < nNodeIndex || nMaxIndex <= nBreakIndex)
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 57c747b4c0d1..3da3a10bce10 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -66,9 +66,9 @@ public:
 
     bool Read( SvStream& rStream );
 
-    sal_uLong GetBreakIndex( sal_uInt16 nIdx ) const { return mIndices[ nIdx ]; }
+    sal_uLong GetBreakIndex( size_t nIdx ) const { return mIndices[ nIdx ]; }
     sal_Int32 GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; }
-    sal_uInt16 GetBreakType( sal_uInt16 nIdx ) const { return aType[ nIdx ]; }
+    sal_uInt16 GetBreakType( size_t nIdx ) const { return aType[ nIdx ]; }
 
     size_t GetFlyCount() const { return m_FlyCache.size(); }
     SwFlyCache& GetFlyCache( size_t nIdx ) { return m_FlyCache[ nIdx ]; }


More information about the Libreoffice-commits mailing list