mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
sys: Reformat all
This commit is contained in:
@@ -219,10 +219,8 @@ namespace hex {
|
||||
}
|
||||
|
||||
void ContentRegistry::PatternLanguage::addColorPalette(const std::string &unlocalizedName, const std::vector<u32> &colors) {
|
||||
s_colorPalettes.push_back({
|
||||
unlocalizedName,
|
||||
colors
|
||||
});
|
||||
s_colorPalettes.push_back({ unlocalizedName,
|
||||
colors });
|
||||
}
|
||||
|
||||
void ContentRegistry::PatternLanguage::setSelectedPalette(u32 index) {
|
||||
|
||||
@@ -29,13 +29,15 @@ namespace hex {
|
||||
static std::map<u32, ImHexApi::HexEditor::Highlighting> s_highlights;
|
||||
|
||||
Highlighting::Highlighting(Region region, color_t color, const std::string &tooltip)
|
||||
: m_region(region), m_color(color), m_tooltip(tooltip) {
|
||||
: m_region(region), m_color(color), m_tooltip(tooltip) {
|
||||
}
|
||||
|
||||
u32 addHighlight(const Region ®ion, color_t color, std::string tooltip) {
|
||||
auto id = s_highlights.size();
|
||||
|
||||
s_highlights.insert({ id, Highlighting{ region, color, tooltip } });
|
||||
s_highlights.insert({
|
||||
id, Highlighting {region, color, tooltip}
|
||||
});
|
||||
|
||||
return id;
|
||||
}
|
||||
@@ -67,7 +69,7 @@ namespace hex {
|
||||
namespace ImHexApi::Provider {
|
||||
|
||||
static u32 s_currentProvider;
|
||||
static std::vector<prv::Provider*> s_providers;
|
||||
static std::vector<prv::Provider *> s_providers;
|
||||
|
||||
prv::Provider *get() {
|
||||
if (!ImHexApi::Provider::isValid())
|
||||
@@ -82,7 +84,7 @@ namespace hex {
|
||||
|
||||
void setCurrentProvider(u32 index) {
|
||||
if (index < s_providers.size()) {
|
||||
auto oldProvider = get();
|
||||
auto oldProvider = get();
|
||||
s_currentProvider = index;
|
||||
EventManager::post<EventProviderChanged>(oldProvider, get());
|
||||
}
|
||||
@@ -126,7 +128,7 @@ namespace hex {
|
||||
getDeferredCalls().push_back(function);
|
||||
}
|
||||
|
||||
std::vector<std::function<void()>>& getDeferredCalls() {
|
||||
std::vector<std::function<void()>> &getDeferredCalls() {
|
||||
return s_deferredCalls;
|
||||
}
|
||||
|
||||
@@ -169,8 +171,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
|
||||
|
||||
const ProgramArguments& getProgramArguments() {
|
||||
const ProgramArguments &getProgramArguments() {
|
||||
return impl::s_programArguments;
|
||||
}
|
||||
|
||||
@@ -203,7 +204,7 @@ namespace hex {
|
||||
return impl::s_mainDockSpaceId;
|
||||
}
|
||||
|
||||
std::map<std::string, std::string>& getInitArguments() {
|
||||
std::map<std::string, std::string> &getInitArguments() {
|
||||
static std::map<std::string, std::string> initArgs;
|
||||
|
||||
return initArgs;
|
||||
|
||||
@@ -17,35 +17,35 @@ namespace hex {
|
||||
|
||||
auto pluginName = fs::path(path).stem().string();
|
||||
|
||||
this->m_initializePluginFunction = getPluginFunction<InitializePluginFunc>("initializePlugin");
|
||||
this->m_getPluginNameFunction = getPluginFunction<GetPluginNameFunc>("getPluginName");
|
||||
this->m_getPluginAuthorFunction = getPluginFunction<GetPluginAuthorFunc>("getPluginAuthor");
|
||||
this->m_getPluginDescriptionFunction = getPluginFunction<GetPluginDescriptionFunc>("getPluginDescription");
|
||||
this->m_getCompatibleVersionFunction = getPluginFunction<GetCompatibleVersionFunc>("getCompatibleVersion");
|
||||
this->m_setImGuiContextFunction = getPluginFunction<SetImGuiContextFunc>("setImGuiContext");
|
||||
this->m_isBuiltinPluginFunction = getPluginFunction<IsBuiltinPluginFunc>("isBuiltinPlugin");
|
||||
this->m_initializePluginFunction = getPluginFunction<InitializePluginFunc>("initializePlugin");
|
||||
this->m_getPluginNameFunction = getPluginFunction<GetPluginNameFunc>("getPluginName");
|
||||
this->m_getPluginAuthorFunction = getPluginFunction<GetPluginAuthorFunc>("getPluginAuthor");
|
||||
this->m_getPluginDescriptionFunction = getPluginFunction<GetPluginDescriptionFunc>("getPluginDescription");
|
||||
this->m_getCompatibleVersionFunction = getPluginFunction<GetCompatibleVersionFunc>("getCompatibleVersion");
|
||||
this->m_setImGuiContextFunction = getPluginFunction<SetImGuiContextFunc>("setImGuiContext");
|
||||
this->m_isBuiltinPluginFunction = getPluginFunction<IsBuiltinPluginFunc>("isBuiltinPlugin");
|
||||
}
|
||||
|
||||
Plugin::Plugin(Plugin &&other) noexcept {
|
||||
this->m_handle = other.m_handle;
|
||||
this->m_path = std::move(other.m_path);
|
||||
this->m_path = std::move(other.m_path);
|
||||
|
||||
this->m_initializePluginFunction = other.m_initializePluginFunction;
|
||||
this->m_getPluginNameFunction = other.m_getPluginNameFunction;
|
||||
this->m_getPluginAuthorFunction = other.m_getPluginAuthorFunction;
|
||||
this->m_getPluginDescriptionFunction = other.m_getPluginDescriptionFunction;
|
||||
this->m_getCompatibleVersionFunction = other.m_getCompatibleVersionFunction;
|
||||
this->m_setImGuiContextFunction = other.m_setImGuiContextFunction;
|
||||
this->m_isBuiltinPluginFunction = other.m_isBuiltinPluginFunction;
|
||||
this->m_initializePluginFunction = other.m_initializePluginFunction;
|
||||
this->m_getPluginNameFunction = other.m_getPluginNameFunction;
|
||||
this->m_getPluginAuthorFunction = other.m_getPluginAuthorFunction;
|
||||
this->m_getPluginDescriptionFunction = other.m_getPluginDescriptionFunction;
|
||||
this->m_getCompatibleVersionFunction = other.m_getCompatibleVersionFunction;
|
||||
this->m_setImGuiContextFunction = other.m_setImGuiContextFunction;
|
||||
this->m_isBuiltinPluginFunction = other.m_isBuiltinPluginFunction;
|
||||
|
||||
other.m_handle = nullptr;
|
||||
other.m_initializePluginFunction = nullptr;
|
||||
other.m_getPluginNameFunction = nullptr;
|
||||
other.m_getPluginAuthorFunction = nullptr;
|
||||
other.m_getPluginDescriptionFunction = nullptr;
|
||||
other.m_getCompatibleVersionFunction = nullptr;
|
||||
other.m_setImGuiContextFunction = nullptr;
|
||||
other.m_isBuiltinPluginFunction = nullptr;
|
||||
other.m_handle = nullptr;
|
||||
other.m_initializePluginFunction = nullptr;
|
||||
other.m_getPluginNameFunction = nullptr;
|
||||
other.m_getPluginAuthorFunction = nullptr;
|
||||
other.m_getPluginDescriptionFunction = nullptr;
|
||||
other.m_getCompatibleVersionFunction = nullptr;
|
||||
other.m_setImGuiContextFunction = nullptr;
|
||||
other.m_isBuiltinPluginFunction = nullptr;
|
||||
}
|
||||
|
||||
Plugin::~Plugin() {
|
||||
|
||||
Reference in New Issue
Block a user