History

Add a cast to silence an MSVC warning

This avoids this warning: test/api/BaseThreadDecoderTest.cpp(280) : warning C4267: 'initializing' : conversion from 'size_t' to 'int32_t', possible loss of data

Martin Storsjö committed 6 years ago

Commit f062c221 parent 4ba17161 file · +1 −1Browse files

Showing the changes to test/api/BaseThreadDecoderTest.cpp (1 of 1 file). Show all

Unified · Split

test/api/BaseThreadDecoderTest.cpp+1−1
@@ -277,7 +277,7 @@ bool BaseThreadDecoderTest::ThreadDecodeFile (const char* fileName, Callback* cb · 276 unmodified lines
277 memset (&sBufInfo, 0, sizeof (SBufferInfo));277 memset (&sBufInfo, 0, sizeof (SBufferInfo));
278 int32_t bufPos = 0;278 int32_t bufPos = 0;
279 int32_t bytesConsumed = 0;279 int32_t bytesConsumed = 0;
280 int32_t fileSize = buf.Length();280 int32_t fileSize = (int32_t)buf.Length();
281 while (bytesConsumed < fileSize) {281 while (bytesConsumed < fileSize) {
282 int32_t frameSize = ReadFrame (buf.data(), fileSize, bufPos);282 int32_t frameSize = ReadFrame (buf.data(), fileSize, bufPos);
283 if (::testing::Test::HasFatalFailure()) {283 if (::testing::Test::HasFatalFailure()) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t