History

Fix a cast to actually cast to the right type

The existing cast didn't make much sense. The expression itself is already int, there's little point in casting it to int, especially when assigning to a float. This fixes warnings with MSVC.

Martin Storsjö committed 11 years ago

Commit a852ac91 parent 93cb6171 file · +1 −1Browse files

Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all

Unified · Split

test/encoder/EncUT_EncoderExt.cpp+1−1
@@ -191,7 +191,7 @@ TEST_F (EncoderInterfaceTest, EncoderOptionSetTest) { · 190 unmodified lines
191 pSrcPic->uiTimeStamp += 30;191 pSrcPic->uiTimeStamp += 30;
192 192
193 eOptionId = ENCODER_OPTION_FRAME_RATE;193 eOptionId = ENCODER_OPTION_FRAME_RATE;
194 fValue = static_cast<int> (rand() % 60 - 5);194 fValue = static_cast<float> (rand() % 60 - 5);
195 iResult = pPtrEnc->SetOption (eOptionId, &fValue);195 iResult = pPtrEnc->SetOption (eOptionId, &fValue);
196 196
197 if (fValue <= 0)197 if (fValue <= 0)

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