about summary refs log tree commit diff stats
path: root/data/maps/the_sweet
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-09-13 12:43:37 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-09-13 12:43:37 -0400
commit95b50d5ac1714bf7e9869e12dfe13f4addec66f5 (patch)
treead3fda2cf9dafebf522fb8f49f2692fe49954a28 /data/maps/the_sweet
parentb629dfb3f196dc787b2e477ea0dbdbe1c5b9eabe (diff)
downloadlingo2-archipelago-95b50d5ac1714bf7e9869e12dfe13f4addec66f5.tar.gz
lingo2-archipelago-95b50d5ac1714bf7e9869e12dfe13f4addec66f5.tar.bz2
lingo2-archipelago-95b50d5ac1714bf7e9869e12dfe13f4addec66f5.zip
[Client] Fixed warnings in gallery
Diffstat (limited to 'data/maps/the_sweet')
0 files changed, 0 insertions, 0 deletions
> 2024-05-14 11:41:50 -0400 Hovered connections on subway map!' href='/lingo-ap-tracker/commit/src/network_set.cpp?h=v0.10.3&id=7f4b6b4f0cb276a7e0868c7e97d862b1feb468d3'>7f4b6b4 ^
7f4b6b4 ^
a5a6c1b ^
7f4b6b4 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30


                          


                           
                                            




                          

                                     
   





                                           





                                                
                                                                                
                                 
 
#include "network_set.h"

void NetworkSet::Clear() {
  network_by_item_.clear();
}

void NetworkSet::AddLink(int id1, int id2) {
  if (id2 > id1) {
    // Make sure id1 < id2
    std::swap(id1, id2);
  }

  if (!network_by_item_.count(id1)) {
    network_by_item_[id1] = {};
  }
  if (!network_by_item_.count(id2)) {
    network_by_item_[id2] = {};
  }

  network_by_item_[id1].insert({id1, id2});
  network_by_item_[id2].insert({id1, id2});
}

bool NetworkSet::IsItemInNetwork(int id) const {
  return network_by_item_.count(id);
}

const std::set<std::pair<int, int>>& NetworkSet::GetNetworkGraph(int id) const {
  return network_by_item_.at(id);
}