Skip to content

Commit c8acce2

Browse files
committed
Codefix: Explicitly cast size_t result to uint32_t.
1 parent 01addcc commit c8acce2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sample.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,15 @@ void Sample::SetOffset(uint32_t offset)
228228

229229
uint32_t Sample::GetNextOffset() const
230230
{
231-
return this->offset +
231+
return static_cast<uint32_t>(
232+
this->offset +
232233
1 + // length of the name
233234
(this->name.length() + 1) + // the name + '\0'
234235
this->size + // size of the data
235236
1 + // the delimiter
236237
1 + // length of the filename
237-
(this->filename.length() + 1); // the filename + '\0'
238+
(this->filename.length() + 1) // the filename + '\0'
239+
);
238240
}
239241

240242
uint32_t Sample::GetOffset() const

0 commit comments

Comments
 (0)