DSPAssembler: Rework errors and warnings

Among other things, this trims trailing newline characters. Before (on windows) the \r would corrupt the output and make them very hard to understand (as the error message would be drawn over the code line, but part of the code line would peek out from behind it).
This commit is contained in:
Pokechu22 committed 2022-05-23 20:27:17 -07:00
1 parent db3d457e5f
commit bd3173e344
3 files changed
+156 -126

No files matched your search

+1 -7
View File
@@ -35,13 +35,7 @@ bool Assemble(const std::string& text, std::vector<u16>& code, bool force)
// TODO: fix the terrible api of the assembler.
DSPAssembler assembler(settings);
if (!assembler.Assemble(text, code))
{
std::cerr << assembler.GetErrorString() << std::endl;
return false;
}
return true;
return assembler.Assemble(text, code);
}
bool Disassemble(const std::vector<u16>& code, bool line_numbers, std::string& text)