Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use duration() as a virtual function #1514

Merged

Conversation

darbyjohnston
Copy link
Contributor

Fixes #1513

I noticed a helper function _safe_duration() that was dynamically casting a Composable just to call the function duration(). This isn't necessary since duration() is a virtual function of Composable. The function _safe_duration() could be removed and replaced with calls to duration().

Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2023

Codecov Report

Merging #1514 (b5652d2) into main (6d5f7da) will increase coverage by 0.01%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1514      +/-   ##
==========================================
+ Coverage   80.08%   80.10%   +0.01%     
==========================================
  Files         197      197              
  Lines       21695    21687       -8     
  Branches     4298     4295       -3     
==========================================
- Hits        17375    17372       -3     
+ Misses       2173     2170       -3     
+ Partials     2147     2145       -2     
Flag Coverage Δ
py-unittests 80.10% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/opentimelineio/composable.cpp 54.83% <0.00%> (-1.83%) ⬇️
src/opentimelineio/item.h 100.00% <ø> (ø)
src/opentimelineio/track.cpp 52.85% <0.00%> (+1.17%) ⬆️
src/opentimelineio/transition.h 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d5f7da...b5652d2. Read the comment docs.

@meshula
Copy link
Collaborator

meshula commented Jan 11, 2023

ltgm! This looks like some legacy that fell through the cracks. Thanks for the fix!

@meshula meshula merged commit d0133d1 into AcademySoftwareFoundation:main Jan 11, 2023
MichaelPlug pushed a commit to MichaelPlug/OpenTimelineIO that referenced this pull request Aug 5, 2023
Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
Signed-off-by: Michele Spina <michelespina96@gmail.com>
@reinecke reinecke added this to the Public Beta 16 milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use duration() as a virtual function
4 participants