diff --git a/include/errors_warnings.h b/include/errors_warnings.h index dca3de89..6c03f41f 100644 --- a/include/errors_warnings.h +++ b/include/errors_warnings.h @@ -92,8 +92,6 @@ extern const char *const WARN_TRANSPARENCY_COLLAPSE; // Internal compiler errors (due to bug in the compiler) void internalerror(std::string message); -void internalerror_numPalettesInPrimaryNeqPrimaryPalettesSize(std::string context, std::size_t configNumPalettesPrimary, - std::size_t primaryPalettesSize); void internalerror_unknownCompilerMode(std::string context); void internalerror_unknownDecompilerMode(std::string context); diff --git a/src/compiler.cpp b/src/compiler.cpp index d52df51a..87069b1e 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -625,9 +625,9 @@ std::unique_ptr compile(PtContext &ctx, const DecompiledTileset { if (ctx.compilerConfig.mode == CompilerMode::SECONDARY && (ctx.fieldmapConfig.numPalettesInPrimary != ctx.compilerContext.pairedPrimaryTileset->palettes.size())) { - internalerror_numPalettesInPrimaryNeqPrimaryPalettesSize("compiler::compile", - ctx.fieldmapConfig.numPalettesInPrimary, - ctx.compilerContext.pairedPrimaryTileset->palettes.size()); + internalerror(fmt::format( + "compiler::compile config.numPalettesInPrimary did not match primary palette set size ({} != {})", + ctx.fieldmapConfig.numPalettesInPrimary, ctx.compilerContext.pairedPrimaryTileset->palettes.size())); } auto compiled = std::make_unique(); diff --git a/src/errors_warnings.cpp b/src/errors_warnings.cpp index 45ac1e23..225f5396 100644 --- a/src/errors_warnings.cpp +++ b/src/errors_warnings.cpp @@ -52,13 +52,6 @@ static std::string getTilePrettyString(const RGBATile &tile) void internalerror(std::string message) { throw std::runtime_error(message); } -void internalerror_numPalettesInPrimaryNeqPrimaryPalettesSize(std::string context, std::size_t configNumPalettesPrimary, - std::size_t primaryPalettesSize) -{ - internalerror("config.numPalettesInPrimary did not match primary palette set size (" + - std::to_string(configNumPalettesPrimary) + " != " + std::to_string(primaryPalettesSize) + ")"); -} - void internalerror_unknownCompilerMode(std::string context) { internalerror(context + " unknown CompilerMode"); } void internalerror_unknownDecompilerMode(std::string context) { internalerror(context + " unknown DecompilerMode"); }