Skip to content

Commit

Permalink
Compiler: Fix CImportIdentifierNotFoundError platform-dependent order
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLynix committed Dec 27, 2024
1 parent 1c87be4 commit 1559d89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/NZSL/Ast/SanitizeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <NZSL/Lang/LangData.hpp>
#include <fmt/format.h>
#include <frozen/unordered_map.h>
#include <tsl/ordered_map.h>
#include <numeric>
#include <stdexcept>
#include <unordered_set>
Expand Down Expand Up @@ -2483,7 +2484,7 @@ NAZARA_WARNING_POP()
if (node.identifiers.empty())
throw AstEmptyImportError{ node.sourceLocation };

std::unordered_map<std::string, std::vector<std::string>> importedSymbols;
tsl::ordered_map<std::string, std::vector<std::string>> importedSymbols;
bool importEverythingElse = false;
for (const auto& entry : node.identifiers)
{
Expand All @@ -2507,7 +2508,7 @@ NAZARA_WARNING_POP()
if (it == importedSymbols.end())
it = importedSymbols.emplace(entry.identifier, std::vector<std::string>{}).first;

std::vector<std::string>& symbols = it->second;
std::vector<std::string>& symbols = it.value();

// Non-renamed symbols can be present only once
if (entry.renamedIdentifier.empty())
Expand Down

0 comments on commit 1559d89

Please sign in to comment.