Skip to content

Commit

Permalink
Merge pull request #171 from AppDevNext/FixLint
Browse files Browse the repository at this point in the history
Fix lint warning
  • Loading branch information
hannesa2 authored Nov 28, 2023
2 parents 3299d95 + bfa38f6 commit d556733
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.github.mikephil.charting.utils.MPPointF;
import com.github.mikephil.charting.utils.Utils;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

Expand All @@ -34,7 +33,7 @@ public class PieChart extends PieRadarChartBase<PieData> {
* rect object that represents the bounds of the piechart, needed for
* drawing the circle
*/
private RectF mCircleBox = new RectF();
private final RectF mCircleBox = new RectF();

/**
* flag indicating if entry labels should be drawn or not
Expand Down Expand Up @@ -76,7 +75,7 @@ public class PieChart extends PieRadarChartBase<PieData> {
*/
private CharSequence mCenterText = "";

private MPPointF mCenterTextOffset = MPPointF.getInstance(0, 0);
private final MPPointF mCenterTextOffset = MPPointF.getInstance(0, 0);

/**
* indicates the size of the hole in the center of the piechart, default:
Expand Down Expand Up @@ -304,10 +303,9 @@ public boolean needsHighlight(int index) {
if (!valuesToHighlight())
return false;

for (int i = 0; i < mIndicesToHighlight.length; i++)

// check if the xvalue for the given dataset needs highlight
if ((int) mIndicesToHighlight[i].getX() == index)
// check if the xvalue for the given dataset needs highlight
for (Highlight highlight : mIndicesToHighlight)
if ((int) highlight.getX() == index)
return true;

return false;
Expand Down

0 comments on commit d556733

Please sign in to comment.