mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-02-08 02:36:49 +08:00
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 != m_end) {
|
||||||
if (*m_pos == '\n') {
|
if (*m_pos == '\n') {
|
||||||
++line;
|
++line;
|
||||||
m_last_col = col;
|
m_last_col = std::exchange(col, 1);
|
||||||
col = 1;
|
|
||||||
} else {
|
} else {
|
||||||
++col;
|
++col;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user