fix: fix compile.
This commit is contained in:
@@ -28,13 +28,13 @@ void TypedSymbolList::read(const std::filesystem::path& path) {
|
||||
}
|
||||
|
||||
void TypedSymbolList::write(const std::filesystem::path& path) const {
|
||||
std::ofstream ofs;
|
||||
std::ofstream ofs(path);
|
||||
for (const auto& [symbol, decl_type] : m_data) {
|
||||
ofs << symbol << ", " << decl_type.string() << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
void TypedSymbolList::record(std::string_view symbol, DeclType type) {
|
||||
void TypedSymbolList::record(const std::string& symbol, DeclType type) {
|
||||
m_data.emplace(symbol, type);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
void read(const std::filesystem::path& path) override;
|
||||
void write(const std::filesystem::path& path) const override;
|
||||
|
||||
void record(std::string_view name, DeclType type);
|
||||
void record(const std::string& symbol, DeclType type);
|
||||
|
||||
constexpr void for_each(const for_each_callback_t& callback) const {
|
||||
for (const auto& entity : m_data) callback(entity);
|
||||
|
||||
Reference in New Issue
Block a user