refactor(stringstream): Shorten to sstream
This commit is contained in:
parent
977efd15e5
commit
dceb3606b1
@ -29,17 +29,17 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
class stringstream {
|
||||
class sstream {
|
||||
public:
|
||||
stringstream() : m_stream() {}
|
||||
sstream() : m_stream() {}
|
||||
|
||||
template <typename T>
|
||||
stringstream& operator<<(const T& object) {
|
||||
sstream& operator<<(const T& object) {
|
||||
m_stream << object;
|
||||
return *this;
|
||||
}
|
||||
|
||||
stringstream& operator<<(const char* cz) {
|
||||
sstream& operator<<(const char* cz) {
|
||||
m_stream << cz;
|
||||
return *this;
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ namespace net {
|
||||
suffixes.pop_back();
|
||||
}
|
||||
|
||||
return stringstream() << std::setw(minwidth) << std::setfill(' ') << std::setprecision(0) << std::fixed << speedrate
|
||||
return sstream() << std::setw(minwidth) << std::setfill(' ') << std::setprecision(0) << std::fixed << speedrate
|
||||
<< " " << suffix << "/s";
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ namespace modules {
|
||||
workspace_n++;
|
||||
|
||||
if (m_click) {
|
||||
builder->cmd(mousebtn::LEFT, stringstream() << EVENT_CLICK << m_index << "+" << workspace_n, ws.second);
|
||||
builder->cmd(mousebtn::LEFT, sstream() << EVENT_CLICK << m_index << "+" << workspace_n, ws.second);
|
||||
} else {
|
||||
builder->node(ws.second);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ Visual* connection::visual(uint8_t depth) {
|
||||
* Create X window id string
|
||||
*/
|
||||
string connection::id(xcb_window_t w) const {
|
||||
return stringstream() << "0x" << std::hex << std::setw(7) << std::setfill('0') << w;
|
||||
return sstream() << "0x" << std::hex << std::setw(7) << std::setfill('0') << w;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user