SenseApiMgr: Print dev info when detaching, use early return pattern
This commit is contained in:
@@ -312,15 +312,17 @@ static int xcbWindow_detachDeviceReq(const smo::device::SenseDeviceSpec& spec)
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (it != g_attachedWindows.end())
|
if (it == g_attachedWindows.end())
|
||||||
{
|
{
|
||||||
g_attachedWindows.erase(it);
|
std::cerr << __func__ << ": Device not found for detachment:\n"
|
||||||
std::cout << __func__ << ": Detached X11 window device\n";
|
<< spec.stringify() << "\n";
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cerr << __func__ << ": Device not found for detachment\n";
|
g_attachedWindows.erase(it);
|
||||||
return -1;
|
std::cout << __func__ << ": Detached X11 window device:\n"
|
||||||
|
<< spec.stringify() << "\n";
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SenseApi descriptor
|
// SenseApi descriptor
|
||||||
|
|||||||
Reference in New Issue
Block a user