Skip to content

Commit f5bf6e5

Browse files
PaulStoffregencmaglie
authored andcommitted
Add BoardPort copy constructor
1 parent f81798b commit f5bf6e5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

arduino-core/src/cc/arduino/packages/BoardPort.java

+12
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ public BoardPort() {
4747
this.prefs = new PreferencesMap();
4848
}
4949

50+
public BoardPort(BoardPort bp) {
51+
prefs = new PreferencesMap();
52+
// TODO: copy bp.prefs to prefs
53+
address = bp.address;
54+
protocol = bp.protocol;
55+
boardName = bp.boardName;
56+
vid = bp.vid;
57+
pid = bp.pid;
58+
iserial = bp.iserial;
59+
label = bp.label;
60+
}
61+
5062
public String getAddress() {
5163
return address;
5264
}

0 commit comments

Comments
 (0)