From 65e06542491375953a481aee3f99ad412721b2d4 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Sat, 3 Jan 2015 18:45:28 +0100 Subject: Fix typo / editor bug or something like that. While running code analysis tools this issue popped up. As it is written it is clearly a NOP, but the reason for why it is written that way remains unknown. I suspect that it was a textfragment introduced by some repeat-function of the used editor (think '.' in VIM). The code was introduced by commit a932a7a801 and looked like this in the original form: if(!XQueryTree(FbTk::App::instance()->display(), window().window(), &root_return, &parent_return, &children_return, &nchildren_return)) parent_return=parent_return;//return; Look at the outcommented return statement. I decided to return from that function instead of the NOP. --- src/FbTk/Container.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FbTk/Container.cc b/src/FbTk/Container.cc index b944c98..9ccae92 100644 --- a/src/FbTk/Container.cc +++ b/src/FbTk/Container.cc @@ -129,7 +129,7 @@ bool Container::moveItemTo(Item item, int x, int y) { // get the root window if (!XQueryTree(display(), window(), &root_return, &parent_return, &children_return, &nchildren_return)) - parent_return = parent_return; + return false; if (children_return != NULL) XFree(children_return); -- cgit v0.11.2