Skip to content

Commit 06dc494

Browse files
reineckecharles
andauthored
Fix ImageSequenceReference implicit cast (#889)
* Explicitly cast size_t to int before comparison with frame_zero_padding. Co-authored-by: charles <[email protected]>> * Fixed a line in the README to be correct for both python 2 and 3. Co-authored-by: charles <[email protected]>> Co-authored-by: charles <[email protected]>>
1 parent 5f552ee commit 06dc494

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ import opentimelineio as otio
8383
8484
timeline = otio.adapters.read_from_file("foo.aaf")
8585
for clip in timeline.each_clip():
86-
print clip.name, clip.duration()
86+
print(clip.name, clip.duration())
8787
```
8888

8989
There are more code examples here: https://github.com/PixarAnimationStudios/OpenTimelineIO/tree/master/examples

src/opentimelineio/imageSequenceReference.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ ImageSequenceReference::ImageSequenceReference(std::string const& target_url_bas
8787
std::string image_num_string = std::to_string(abs(file_image_num));
8888

8989
std::string zero_pad = std::string();
90-
if (image_num_string.length() < _frame_zero_padding) {
90+
if (static_cast<int>(image_num_string.length()) < _frame_zero_padding) {
9191
zero_pad = std::string(_frame_zero_padding - image_num_string.length(), '0');
9292
}
9393

0 commit comments

Comments
 (0)