Skip to content

Commit

Permalink
Fix unnecessary boolean expression
Browse files Browse the repository at this point in the history
This change fixes boolean expressions like `a && a` and `a || a` where both
arguments are the same, by replacing the entire expression with `a`.

The clean up is being done in preparation for enabling a build error.

*Note to reviewers* the intent may have been to use two different expressions
(e.g. `a && b`). If this isn't the best fix, please suggest an edit in
critique.

More information:
https://docs.google.com[]document/d/1FN2oqU8QmJ2aVSx969rORp-nWcfgdVjqZ6KOFyxYcHY/edit?usp=sharing

Tested:
    TAP train for global presubmit queue
    []    All failing tests were failing before this change

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127787709
  • Loading branch information
cushon authored and ojw28 committed Jul 28, 2016
1 parent 05514f9 commit 27ca86e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ private static MediaFormat parseMediaFormat(NalUnitTargetBuffer vps, NalUnitTarg
bitArray.readUnsignedExpGolombCodedInt(); // max_transform_hierarchy_depth_inter
bitArray.readUnsignedExpGolombCodedInt(); // max_transform_hierarchy_depth_intra
// if (scaling_list_enabled_flag) { if (sps_scaling_list_data_present_flag) {...}}
if (bitArray.readBit() && bitArray.readBit()) {
boolean scalingListEnabled = bitArray.readBit();
if (scalingListEnabled && bitArray.readBit()) {
skipScalingList(bitArray);
}
bitArray.skipBits(2); // amp_enabled_flag (1), sample_adaptive_offset_enabled_flag (1)
Expand Down

0 comments on commit 27ca86e

Please sign in to comment.