MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / populateRangeMap

Method populateRangeMap

genericrange.h:95–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 map<uint64_t, GenericRange<T>> m_rangeMap;
94
95 void populateRangeMap()
96 {
97 uint64_t nextStart = 0;
98 for (const auto& i : m_flattenedRanges)
99 {
100 if (i.GetStart() > nextStart)
101 m_rangeMap.emplace(nextStart, GenericRange<T>(nextStart, i.GetStart() - 1, vector<T>()));
102
103 m_rangeMap.emplace(i.GetStart(), GenericRange<T>(i.GetStart(), i.GetEnd(), i.GetItems()));
104 nextStart = i.GetEnd();
105 if (nextStart != std::numeric_limits<uint64_t>::max())
106 nextStart++;
107 }
108
109 if (nextStart != std::numeric_limits<uint64_t>::max())
110 m_rangeMap.emplace(nextStart, GenericRange<T>(nextStart, std::numeric_limits<uint64_t>::max(), vector<T>()));
111 }
112
113 public:
114 static void flatten(vector<GenericRange<T>>& intervals)

Callers

nothing calls this directly

Calls 2

GetStartMethod · 0.45
GetEndMethod · 0.45

Tested by

no test coverage detected