Skip to content

Commit

Permalink
Removed redundant calls
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Jul 17, 2015
1 parent 077b254 commit 1f571a3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions MPChartLib/src/com/github/mikephil/charting/data/DataSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ public void notifyDataSetChanged() {
* calc minimum and maximum y value
*/
protected void calcMinMax(int start, int end) {
if (mYVals.size() == 0)
final int yValCount = mYVals.size();

if (yValCount == 0)
return;

int endValue;

if (end == 0 || end >= mYVals.size())
endValue = mYVals.size() - 1;
if (end == 0 || end >= yValCount)
endValue = yValCount - 1;
else
endValue = end;

Expand Down

0 comments on commit 1f571a3

Please sign in to comment.