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

@@ -19,7 +19,7 @@ namespace hex {
}
void ImHexApi::Bookmarks::add(Region region, std::string_view name, std::string_view comment, u32 color) {
void ImHexApi::Bookmarks::add(Region region, const std::string &name, const std::string &comment, u32 color) {
Entry entry;
entry.region = region;
@@ -35,7 +35,7 @@ namespace hex {
EventManager::post<RequestAddBookmark>(entry);
}
void ImHexApi::Bookmarks::add(u64 addr, size_t size, std::string_view name, std::string_view comment, u32 color) {
void ImHexApi::Bookmarks::add(u64 addr, size_t size, const std::string &name, const std::string &comment, u32 color) {
Bookmarks::add(Region{addr, size}, name, comment, color);
}