mirror of
https://github.com/open-goal/jak-project
synced 2026-08-17 13:40:39 -04:00
update readme and fix unused function issue (#821)
This commit is contained in:
@@ -102,6 +102,15 @@ int LabelDB::get_index_by_offset(int seg, int offset) const {
|
||||
return m_labels_by_offset_into_seg.at(seg).at(offset);
|
||||
}
|
||||
|
||||
std::optional<int> LabelDB::try_get_index_by_offset(int seg, int offset) const {
|
||||
auto it = m_labels_by_offset_into_seg.at(seg).find(offset);
|
||||
if (it == m_labels_by_offset_into_seg.at(seg).end()) {
|
||||
return {};
|
||||
} else {
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
|
||||
int LabelDB::get_index_by_name(const std::string& name) const {
|
||||
return m_labels_by_name.at(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user