Shipping heavy objects in std::shared_ptr

This commit is contained in:
Sergey Naumov
2016-04-24 10:33:19 +03:00
parent 2962a3cc7a
commit 19f9acb482
3 changed files with 33 additions and 33 deletions

View File

@@ -30,17 +30,17 @@ void dump_tree_container(const i3ipc::container_t& c, std::string& prefix) {
int main() {
i3ipc::connection conn;
for (auto& w : conn.get_workspaces()) {
std::cout << '#' << std::hex << w.num << std::dec
<< "\n\tName: " << w.name
<< "\n\tVisible: " << w.visible
<< "\n\tFocused: " << w.focused
<< "\n\tUrgent: " << w.urgent
std::cout << '#' << std::hex << w->num << std::dec
<< "\n\tName: " << w->name
<< "\n\tVisible: " << w->visible
<< "\n\tFocused: " << w->focused
<< "\n\tUrgent: " << w->urgent
<< "\n\tRect: "
<< "\n\t\tX: " << w.rect.x
<< "\n\t\tY: " << w.rect.y
<< "\n\t\tWidth: " << w.rect.width
<< "\n\t\tHeight: " << w.rect.height
<< "\n\tOutput: " << w.output
<< "\n\t\tX: " << w->rect.x
<< "\n\t\tY: " << w->rect.y
<< "\n\t\tWidth: " << w->rect.width
<< "\n\t\tHeight: " << w->rect.height
<< "\n\tOutput: " << w->output
<< std::endl;
}
std::string prefix_buf;