Use std::exchange

This commit is contained in:
Jason Turner 2016-06-07 12:26:30 -06:00
parent 039d0edce3
commit 228c942b6c

View File

@ -200,8 +200,7 @@ namespace chaiscript
if (m_pos != m_end) {
if (*m_pos == '\n') {
++line;
m_last_col = col;
col = 1;
m_last_col = std::exchange(col, 1);
} else {
++col;
}