History

Remove an impossible condition

uiIntraPeriod is unsigned, and thus can't ever be negative. The subtraction on the line above can't ever make the value wrap around either, since param_.uiIntraPeriod % uiGOPSize always is smaller than or equal to param_.uiIntraPeriod. Thus, the check never is necessary even if the value would be signed either. This fixes warnings when building with clang.

Martin Storsjö committed 12 years ago

Commit 2907cb21 parent a625dc81 file · +0 −3Browse files

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

Unified · Split

test/api/encode_decode_api_test.cpp+0−3
@@ -282,9 +282,6 @@ void EncodeDecodeTestAPI::ValidateParamExtCombination() { · 281 unmodified lines
282 //IntraPeriod282 //IntraPeriod
283 uiGOPSize = 1 << (param_.iTemporalLayerNum - 1);283 uiGOPSize = 1 << (param_.iTemporalLayerNum - 1);
284 param_.uiIntraPeriod -= param_.uiIntraPeriod % uiGOPSize;284 param_.uiIntraPeriod -= param_.uiIntraPeriod % uiGOPSize;
285 if (param_.uiIntraPeriod < 0) {
286 param_.uiIntraPeriod = 0;
287 }
288 285
289//RefNum286//RefNum
290 int32_t iRefUpperBound = (param_.iUsageType == CAMERA_VIDEO_REAL_TIME) ?287 int32_t iRefUpperBound = (param_.iUsageType == CAMERA_VIDEO_REAL_TIME) ?

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