Use std::exchange
This commit is contained in:
parent
039d0edce3
commit
228c942b6c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user