[WiFi] Add copy constructor to WiFi_AP_Candidate class

This commit is contained in:
TD-er
2021-04-24 15:27:12 +02:00
parent 06804fd605
commit b52b198cd0
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -46,6 +46,16 @@ WiFi_AP_Candidate::WiFi_AP_Candidate(uint8_t networkItem) : index(0) {
last_seen = millis();
}
WiFi_AP_Candidate::WiFi_AP_Candidate(const WiFi_AP_Candidate& other)
: ssid(other.ssid), key(other.key), last_seen(other.last_seen),
rssi(other.rssi), channel(other.channel), index(other.index),
enc_type(other.enc_type), isHidden(other.isHidden),
lowPriority(other.lowPriority),
isEmergencyFallback(other.isEmergencyFallback)
{
setBSSID(other.bssid);
}
WiFi_AP_Candidate::WiFi_AP_Candidate() {}
bool WiFi_AP_Candidate::operator<(const WiFi_AP_Candidate& other) const {
+2
View File
@@ -16,6 +16,8 @@ struct WiFi_AP_Candidate {
// Construct using index from WiFi scan result
WiFi_AP_Candidate(uint8_t networkItem);
WiFi_AP_Candidate(const WiFi_AP_Candidate& other);
// Default constructor
WiFi_AP_Candidate();