mirror of https://github.com/AxioDL/metaforce.git
Proper CRLF-handling for #define
This commit is contained in:
parent
344148e3b3
commit
b2586432c7
|
@ -714,6 +714,8 @@ bool Compiler::compileFile(SystemStringView file, std::string_view baseName, std
|
||||||
else
|
else
|
||||||
extraLine = std::string(begin, includesPass.cbegin() + findPos);
|
extraLine = std::string(begin, includesPass.cbegin() + findPos);
|
||||||
*defineContinue += extraLine;
|
*defineContinue += extraLine;
|
||||||
|
if (!defineContinue->empty() && defineContinue->back() == '\r')
|
||||||
|
defineContinue->pop_back();
|
||||||
if (!defineContinue->empty() && defineContinue->back() == '\\')
|
if (!defineContinue->empty() && defineContinue->back() == '\\')
|
||||||
defineContinue->pop_back();
|
defineContinue->pop_back();
|
||||||
else
|
else
|
||||||
|
@ -723,6 +725,8 @@ bool Compiler::compileFile(SystemStringView file, std::string_view baseName, std
|
||||||
{
|
{
|
||||||
std::string& defOut = m_defines[subMatch[1].str()];
|
std::string& defOut = m_defines[subMatch[1].str()];
|
||||||
defOut = subMatch[2].str();
|
defOut = subMatch[2].str();
|
||||||
|
if (!defOut.empty() && defOut.back() == '\r')
|
||||||
|
defOut.pop_back();
|
||||||
if (!defOut.empty() && defOut.back() == '\\')
|
if (!defOut.empty() && defOut.back() == '\\')
|
||||||
{
|
{
|
||||||
defOut.pop_back();
|
defOut.pop_back();
|
||||||
|
|
Loading…
Reference in New Issue