[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer

Stephan Bergmann sbergman at redhat.com
Wed Mar 29 11:53:15 UTC 2017


 drawinglayer/source/animation/animationtiming.cxx  |   10 +++++-----
 include/drawinglayer/animation/animationtiming.hxx |    6 ++++--
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 225ca94608243a4fa1feeba92153dd348f4da017
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 29 10:33:14 2017 +0200

    Propagate proper integer type out of AnimationEntryList::impGetIndexAtTime
    
    ...after 49f8917cd4c10685645128768a2dc63043a7b398 "fix loplugin:loopvartoosmall"
    
    Change-Id: I8ec284711afa2f8323462a87d30fdf4c27941b6c
    Reviewed-on: https://gerrit.libreoffice.org/35830
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/drawinglayer/source/animation/animationtiming.cxx b/drawinglayer/source/animation/animationtiming.cxx
index 44210b9567c6..c5c39d77328f 100644
--- a/drawinglayer/source/animation/animationtiming.cxx
+++ b/drawinglayer/source/animation/animationtiming.cxx
@@ -159,16 +159,16 @@ namespace drawinglayer
         }
 
 
-        sal_uInt32 AnimationEntryList::impGetIndexAtTime(double fTime, double &rfAddedTime) const
+        AnimationEntryList::Entries::size_type AnimationEntryList::impGetIndexAtTime(double fTime, double &rfAddedTime) const
         {
-            size_t nIndex(0L);
+            Entries::size_type nIndex(0L);
 
             while(nIndex < maEntries.size() && basegfx::fTools::lessOrEqual(rfAddedTime + maEntries[nIndex]->getDuration(), fTime))
             {
                 rfAddedTime += maEntries[nIndex++]->getDuration();
             }
 
-            return sal_uInt32(nIndex);
+            return nIndex;
         }
 
         AnimationEntryList::AnimationEntryList()
@@ -233,7 +233,7 @@ namespace drawinglayer
             if(!basegfx::fTools::equalZero(mfDuration))
             {
                 double fAddedTime(0.0);
-                const sal_uInt32 nIndex(impGetIndexAtTime(fTime, fAddedTime));
+                const auto nIndex(impGetIndexAtTime(fTime, fAddedTime));
 
                 if(nIndex < maEntries.size())
                 {
@@ -251,7 +251,7 @@ namespace drawinglayer
             if(!basegfx::fTools::equalZero(mfDuration))
             {
                 double fAddedTime(0.0);
-                const sal_uInt32 nIndex(impGetIndexAtTime(fTime, fAddedTime));
+                const auto nIndex(impGetIndexAtTime(fTime, fAddedTime));
 
                 if(nIndex < maEntries.size())
                 {
diff --git a/include/drawinglayer/animation/animationtiming.hxx b/include/drawinglayer/animation/animationtiming.hxx
index 67d13eeede0b..f98136d1621a 100644
--- a/include/drawinglayer/animation/animationtiming.hxx
+++ b/include/drawinglayer/animation/animationtiming.hxx
@@ -91,11 +91,13 @@ namespace drawinglayer
         class DRAWINGLAYER_DLLPUBLIC AnimationEntryList : public AnimationEntry
         {
         protected:
+            using Entries = std::vector<std::unique_ptr<AnimationEntry>>;
+
             double                                      mfDuration;
-            ::std::vector< std::unique_ptr<AnimationEntry> >  maEntries;
+            Entries maEntries;
 
             // helpers
-            sal_uInt32 impGetIndexAtTime(double fTime, double &rfAddedTime) const;
+            Entries::size_type impGetIndexAtTime(double fTime, double &rfAddedTime) const;
 
         public:
             AnimationEntryList();


More information about the Libreoffice-commits mailing list