Skip to content

Commit 82d0e08

Browse files
PaulStoffregenfacchinm
authored andcommitted
Add BoardPort copy constructor
1 parent f344cd0 commit 82d0e08

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ public BoardPort() {
4848
this.prefs = new PreferencesMap();
4949
}
5050

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

0 commit comments

Comments
 (0)