mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-28 07:28:20 -04:00
fixed some accepted checkstyle issues
This commit is contained in:
parent
22663d131b
commit
65741df186
@ -94,6 +94,8 @@ public class GraphicSVG implements Graphic, Closeable {
|
|||||||
@Override
|
@Override
|
||||||
public void drawPolygon(Polygon p, Style style) {
|
public void drawPolygon(Polygon p, Style style) {
|
||||||
try {
|
try {
|
||||||
|
//modification of loop variable i is intended!
|
||||||
|
//CHECKSTYLE.OFF: ModifiedControlVariable
|
||||||
w.write("<path d=\"M " + str(p.get(0)));
|
w.write("<path d=\"M " + str(p.get(0)));
|
||||||
for (int i = 1; i < p.size(); i++)
|
for (int i = 1; i < p.size(); i++)
|
||||||
if (p.isBezierStart(i)) {
|
if (p.isBezierStart(i)) {
|
||||||
@ -101,6 +103,7 @@ public class GraphicSVG implements Graphic, Closeable {
|
|||||||
i += 2;
|
i += 2;
|
||||||
} else
|
} else
|
||||||
w.write(" L " + str(p.get(i)));
|
w.write(" L " + str(p.get(i)));
|
||||||
|
//CHECKSTYLE.ON: ModifiedControlVariable
|
||||||
|
|
||||||
if (p.isClosed())
|
if (p.isClosed())
|
||||||
w.write(" Z");
|
w.write(" Z");
|
||||||
|
@ -51,6 +51,8 @@ public class GraphicSwing implements Graphic {
|
|||||||
public void drawPolygon(Polygon p, Style style) {
|
public void drawPolygon(Polygon p, Style style) {
|
||||||
applyStyle(style);
|
applyStyle(style);
|
||||||
Path2D path = new GeneralPath();
|
Path2D path = new GeneralPath();
|
||||||
|
//modification of loop variable i is intended!
|
||||||
|
//CHECKSTYLE.OFF: ModifiedControlVariable
|
||||||
for (int i = 0; i < p.size(); i++) {
|
for (int i = 0; i < p.size(); i++) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
path.moveTo(p.get(i).x, p.get(i).y);
|
path.moveTo(p.get(i).x, p.get(i).y);
|
||||||
@ -62,6 +64,7 @@ public class GraphicSwing implements Graphic {
|
|||||||
path.lineTo(p.get(i).x, p.get(i).y);
|
path.lineTo(p.get(i).x, p.get(i).y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//CHECKSTYLE.ON: ModifiedControlVariable
|
||||||
|
|
||||||
if (p.isClosed())
|
if (p.isClosed())
|
||||||
path.closePath();
|
path.closePath();
|
||||||
|
@ -46,6 +46,8 @@ public class NetList implements Iterable<Net> {
|
|||||||
mergeLabels();
|
mergeLabels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//modification of loop variable j is intended!
|
||||||
|
//CHECKSTYLE.OFF: ModifiedControlVariable
|
||||||
private void mergeLabels() {
|
private void mergeLabels() {
|
||||||
for (int i = 0; i < netList.size() - 1; i++)
|
for (int i = 0; i < netList.size() - 1; i++)
|
||||||
for (int j = i + 1; j < netList.size(); j++)
|
for (int j = i + 1; j < netList.size(); j++)
|
||||||
@ -55,6 +57,7 @@ public class NetList implements Iterable<Net> {
|
|||||||
j--;
|
j--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//CHECKSTYLE.ON: ModifiedControlVariable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a copy of the given net list
|
* Creates a copy of the given net list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user