Skip to content

Commit

Permalink
[core] TermCtl: Fix tidy [clang-analyzer-cplusplus.Move]
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrich committed Jul 13, 2024
1 parent bcaf91a commit 5560887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xci/core/TermCtl.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class TermCtl {
TermCtl& soft_reset();

// Cached seq
std::string seq() { return std::move(m_seq); }
std::string seq() { auto s = std::move(m_seq); m_seq.clear(); return s; }
void write() { write_raw(seq()); }
void write_nl() { m_seq.append(1, '\n'); write(seq()); }
friend std::ostream& operator<<(std::ostream& os, TermCtl& t) { return os << t.seq(); }
Expand Down

0 comments on commit 5560887

Please sign in to comment.