mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
Made tools registry more in-line with the other APIs
This commit is contained in:
@@ -102,11 +102,11 @@ namespace hex {
|
||||
|
||||
/* Tools */
|
||||
|
||||
void ContentRegistry::Tools::add(const std::function<void()> &function) {
|
||||
getEntries().push_back(function);
|
||||
void ContentRegistry::Tools::add(std::string_view name, const std::function<void()> &function) {
|
||||
getEntries().emplace_back(Entry{ name.data(), function });
|
||||
}
|
||||
|
||||
std::vector<std::function<void()>>& ContentRegistry::Tools::getEntries() {
|
||||
std::vector<ContentRegistry::Tools::Entry>& ContentRegistry::Tools::getEntries() {
|
||||
return SharedData::toolsEntries;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace hex {
|
||||
std::vector<ContentRegistry::CommandPaletteCommands::Entry> SharedData::commandPaletteCommands;
|
||||
std::map<std::string, ContentRegistry::PatternLanguageFunctions::Function> SharedData::patternLanguageFunctions;
|
||||
std::vector<View*> SharedData::views;
|
||||
std::vector<std::function<void()>> SharedData::toolsEntries;
|
||||
std::vector<ContentRegistry::Tools::Entry> SharedData::toolsEntries;
|
||||
std::vector<ContentRegistry::DataInspector::Entry> SharedData::dataInspectorEntries;
|
||||
|
||||
int SharedData::mainArgc;
|
||||
|
||||
Reference in New Issue
Block a user