* RegionMap: new 'default' region

This commit is contained in:
Scott Powell committed 2026-04-12 22:06:10 +10:00
1 parent 750ec23916
commit ca696e434a
2 files changed
+19 -5

No files matched your search

+3 -1
View File
@@ -20,7 +20,7 @@ struct RegionEntry {
class RegionMap {
TransportKeyStore* _store;
uint16_t next_id, home_id;
uint16_t next_id, home_id, default_id;
uint16_t num_regions;
RegionEntry regions[MAX_REGION_ENTRIES];
RegionEntry wildcard;
@@ -43,6 +43,8 @@ public:
RegionEntry* findById(uint16_t id);
RegionEntry* getHomeRegion(); // NOTE: can be NULL
void setHomeRegion(const RegionEntry* home);
RegionEntry* getDefaultRegion(); // NOTE: can be NULL
void setDefaultRegion(const RegionEntry* def);
bool removeRegion(const RegionEntry& region);
bool clear();
void resetFrom(const RegionMap& src) { num_regions = 0; next_id = src.next_id; }