Skip to content

Commit c1f171c

Browse files
committed
curve: Remove explicit passing of container size in sync() of KeyframeContainer.
1 parent 829af8e commit c1f171c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

libopenage/curve/keyframe_container.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -330,28 +330,28 @@ class KeyframeContainer {
330330

331331
/**
332332
* Erase all elements after the given element.
333-
*
334-
* @param last_valid Location of the last element to keep.
335-
*
336-
* @return Location (index) of the last element that was kept.
333+
*
334+
* @param last_valid Location of the last element to keep.
335+
*
336+
* @return Location (index) of the last element that was kept.
337337
*/
338338
elem_ptr erase_after(elem_ptr last_valid);
339339

340340
/**
341341
* Erase a single element from the container.
342-
*
343-
* @param it Location of the element to erase.
344-
*
345-
* @return Location (index) of the next element after the erased one.
342+
*
343+
* @param it Location of the element to erase.
344+
*
345+
* @return Location (index) of the next element after the erased one.
346346
*/
347347
elem_ptr erase(elem_ptr it);
348348

349349
/**
350350
* Erase all elements with given time. Starts the search at the end of the container.
351351
*
352-
* @param time Time of the elements to erase.
353-
*
354-
* @return Location (index) of the next element after the erased one.
352+
* @param time Time of the elements to erase.
353+
*
354+
* @return Location (index) of the next element after the erased one.
355355
*/
356356
elem_ptr erase(const time::time_t &time) {
357357
return this->erase(time, this->container.size());
@@ -361,9 +361,9 @@ class KeyframeContainer {
361361
* Erase all element with given time. Include a hint where to start the search.
362362
*
363363
* @param time Time of the elements to erase.
364-
* @param hint Index of the approximate element location.
365-
*
366-
* @return Location (index) of the next element after the erased one.
364+
* @param hint Index of the approximate element location.
365+
*
366+
* @return Location (index) of the next element after the erased one.
367367
*/
368368
elem_ptr erase(const time::time_t &time,
369369
const elem_ptr &hint) {
@@ -633,7 +633,7 @@ KeyframeContainer<T>::sync(const KeyframeContainer<O> &other,
633633
const std::function<T(const O &)> &converter,
634634
const time::time_t &start) {
635635
// Delete elements after start time
636-
elem_ptr at = this->last_before(start, this->container.size());
636+
elem_ptr at = this->last_before(start);
637637
at = this->erase_after(at);
638638

639639
// Find the last element before the start time in the other container

0 commit comments

Comments
 (0)