Don't hard-code std::string as the key type for InsertionOrderedMap

This commit is contained in:
Rangi
2026-05-25 13:57:33 -04:00
parent a0d96a0856
commit ed19806434
4 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ bool forEachChar(
return true;
}
static InsertionOrderedMap<Charmap> charmaps;
static InsertionOrderedMap<std::string, Charmap> charmaps;
static Charmap *currentCharmap;
static std::stack<Charmap *> charmapStack;
+1 -1
View File
@@ -47,7 +47,7 @@ struct SectionStackEntry {
};
static Section *currentSection = nullptr;
static InsertionOrderedMap<Section> sections;
static InsertionOrderedMap<std::string, Section> sections;
static uint32_t curOffset; // Offset into the current section (see `sect_GetSymbolOffset`)
+1 -1
View File
@@ -17,7 +17,7 @@
#include "link/main.hpp"
#include "link/warning.hpp"
static InsertionOrderedMap<std::unique_ptr<Section>> sections;
static InsertionOrderedMap<std::string, std::unique_ptr<Section>> sections;
void sect_ForEach(void (*callback)(Section &)) {
for (std::unique_ptr<Section> &ptr : sections) {