Kaydet (Commit) 225ca946 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Propagate proper integer type out of AnimationEntryList::impGetIndexAtTime

...after 49f8917c "fix loplugin:loopvartoosmall"

Change-Id: I8ec284711afa2f8323462a87d30fdf4c27941b6c
Reviewed-on: https://gerrit.libreoffice.org/35830Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 1672b25e
......@@ -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())
{
......
......@@ -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();
......
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