diff options
author | yenatch <yenatch@gmail.com> | 2017-07-23 22:37:53 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2017-07-23 22:37:53 -0400 |
commit | d2a1118862eac8473d056cfd8a8af28be2b947fd (patch) | |
tree | 5c13a41c2f06ba2582eda8d355f4abcf63d5787a /tools/scaninc/c_file.cpp | |
parent | e73ec108adb15cda40c17ebe891d25460c3c42b3 (diff) |
scaninc: optimize for unix newlines
this probably has no effect whatsoever
Diffstat (limited to 'tools/scaninc/c_file.cpp')
-rw-r--r-- | tools/scaninc/c_file.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/scaninc/c_file.cpp b/tools/scaninc/c_file.cpp index e4e20e609..035af4e1b 100644 --- a/tools/scaninc/c_file.cpp +++ b/tools/scaninc/c_file.cpp @@ -111,16 +111,16 @@ bool CFile::ConsumeHorizontalWhitespace() bool CFile::ConsumeNewline() { - if (m_buffer[m_pos] == '\r' && m_buffer[m_pos + 1] == '\n') + if (m_buffer[m_pos] == '\n') { - m_pos += 2; + m_pos++; m_lineNum++; return true; } - if (m_buffer[m_pos] == '\n') + if (m_buffer[m_pos] == '\r' && m_buffer[m_pos + 1] == '\n') { - m_pos++; + m_pos += 2; m_lineNum++; return true; } |