MCPcopy Create free account
hub / github.com/bytedance/dplm / switch_read_buffer

Method switch_read_buffer

analysis/TMscore.cpp:1726–1738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1724
1725 template <typename C, typename T>
1726 typename basic_pstreambuf<C,T>::buf_read_src
1727 basic_pstreambuf<C,T>::switch_read_buffer(buf_read_src src)
1728 {
1729 if (rsrc_ != src)
1730 {
1731 char_type* tmpbufstate[] = {this->eback(), this->gptr(), this->egptr()};
1732 this->setg(rbufstate_[0], rbufstate_[1], rbufstate_[2]);
1733 for (std::size_t i = 0; i < 3; ++i)
1734 rbufstate_[i] = tmpbufstate[i];
1735 rsrc_ = src;
1736 }
1737 return rsrc_;
1738 }
1739
1740 /**
1741 * Suspends execution and waits for the associated process to exit, or

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected