Skip to content

Commit c666bec

Browse files
committed
Apply lint suggestions
1 parent 5d62083 commit c666bec

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

MPChartLib/src/main/java/com/github/mikephil/charting/renderer/RoundedBarChartRenderer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818
import com.github.mikephil.charting.utils.Utils;
1919
import com.github.mikephil.charting.utils.ViewPortHandler;
2020

21+
/** @noinspection unused*/
2122
public class RoundedBarChartRenderer extends BarChartRenderer {
2223

2324
public RoundedBarChartRenderer(BarDataProvider chart, ChartAnimator animator, ViewPortHandler viewPortHandler) {
2425
super(chart, animator, viewPortHandler);
2526
}
2627

2728
private final RectF mBarShadowRectBuffer = new RectF();
28-
private float mRadius = 20f;
29+
private final float mRadius = 20f;
2930
private float roundedShadowRadius = 0f;
3031
private float roundedPositiveDataSetRadius = 0f;
3132
private float roundedNegativeDataSetRadius = 0f;
@@ -60,7 +61,7 @@ protected void drawDataSet(Canvas c, IBarDataSet dataSet, int index) {
6061
float barWidthHalf = barWidth / 2.0f;
6162
float x;
6263
int i = 0;
63-
double count = Math.min(Math.ceil((int) (double) ((float) dataSet.getEntryCount() * phaseX)), dataSet.getEntryCount());
64+
double count = Math.min((double) (int) (double) ((float) dataSet.getEntryCount() * phaseX), dataSet.getEntryCount());
6465
while (i < count) {
6566
BarEntry e = dataSet.getEntryForIndex(i);
6667
x = e.getX();

MPChartLib/src/main/java/com/github/mikephil/charting/renderer/RoundedHorizontalBarChartRenderer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.github.mikephil.charting.utils.Utils;
1616
import com.github.mikephil.charting.utils.ViewPortHandler;
1717

18+
/** @noinspection unused*/
1819
public class RoundedHorizontalBarChartRenderer extends HorizontalBarChartRenderer {
1920

2021
private final RectF mBarShadowRectBuffer = new RectF();
@@ -58,7 +59,7 @@ protected void drawDataSet(Canvas c, IBarDataSet dataSet, int index) {
5859
float barWidthHalf = barWidth / 2.0f;
5960
float x;
6061
int i = 0;
61-
double count = Math.min(Math.ceil((int) (double) ((float) dataSet.getEntryCount() * phaseX)), dataSet.getEntryCount());
62+
double count = Math.min((double) (int) (double) ((float) dataSet.getEntryCount() * phaseX), dataSet.getEntryCount());
6263
while (i < count) {
6364
BarEntry e = dataSet.getEntryForIndex(i);
6465
x = e.getX();

0 commit comments

Comments
 (0)