sys: Tons of long overdue cleanup

- std::string -> const std::string& where needed
- Added a FileIO abstraction class
- Fixed recent files not updating
- Removed localization file from global include
- Renamed lang to pattern_language/pl
- Renamed EventFileDropped to RequestFileOpen
This commit is contained in:
WerWolv
2021-09-08 15:18:24 +02:00
parent d7707bae62
commit e74c0f5cf5
74 changed files with 549 additions and 494 deletions

View File

@@ -15,7 +15,7 @@ namespace hex {
constexpr auto GetPluginDescriptionSymbol = "_ZN3hex6plugin{0}{1}8internal20getPluginDescriptionEv";
constexpr auto SetImGuiContextSymbol = "_ZN3hex6plugin{0}{1}8internal15setImGuiContextEP12ImGuiContext";
Plugin::Plugin(std::string_view path) {
Plugin::Plugin(const std::string &path) {
this->m_handle = dlopen(path.data(), RTLD_LAZY);
if (this->m_handle == nullptr) {
@@ -84,7 +84,7 @@ namespace hex {
this->m_setImGuiContextFunction(ctx);
}
bool PluginManager::load(std::string_view pluginFolder) {
bool PluginManager::load(const std::string &pluginFolder) {
if (!std::filesystem::exists(pluginFolder))
return false;