* Minor coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42076 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+13
-14
@@ -212,14 +212,13 @@ BMessenger::LockTarget() const
|
|||||||
{
|
{
|
||||||
BLooper *looper = NULL;
|
BLooper *looper = NULL;
|
||||||
Target(&looper);
|
Target(&looper);
|
||||||
if (looper && looper->Lock()) {
|
if (looper != NULL && looper->Lock()) {
|
||||||
if (looper->fMsgPort == fPort)
|
if (looper->fMsgPort == fPort)
|
||||||
return true;
|
return true;
|
||||||
else {
|
|
||||||
looper->Unlock();
|
looper->Unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -243,9 +242,10 @@ BMessenger::LockTargetWithTimeout(bigtime_t timeout) const
|
|||||||
{
|
{
|
||||||
BLooper *looper = NULL;
|
BLooper *looper = NULL;
|
||||||
Target(&looper);
|
Target(&looper);
|
||||||
status_t error = looper ? B_OK : B_BAD_VALUE;
|
if (looper == NULL)
|
||||||
if (error == B_OK)
|
return B_BAD_VALUE;
|
||||||
error = looper->LockWithTimeout(timeout);
|
|
||||||
|
status_t error = looper->LockWithTimeout(timeout);
|
||||||
|
|
||||||
if (error == B_OK && looper->fMsgPort != fPort) {
|
if (error == B_OK && looper->fMsgPort != fPort) {
|
||||||
looper->Unlock();
|
looper->Unlock();
|
||||||
@@ -258,7 +258,7 @@ BMessenger::LockTargetWithTimeout(bigtime_t timeout) const
|
|||||||
|
|
||||||
// #pragma mark - Message sending
|
// #pragma mark - Message sending
|
||||||
|
|
||||||
// SendMessage
|
|
||||||
/*! \brief Delivers a BMessage synchronously to the messenger's target,
|
/*! \brief Delivers a BMessage synchronously to the messenger's target,
|
||||||
without waiting for a reply.
|
without waiting for a reply.
|
||||||
|
|
||||||
@@ -282,7 +282,7 @@ BMessenger::SendMessage(uint32 command, BHandler *replyTo) const
|
|||||||
return SendMessage(&message, replyTo);
|
return SendMessage(&message, replyTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendMessage
|
|
||||||
/*! \brief Delivers a BMessage synchronously to the messenger's target,
|
/*! \brief Delivers a BMessage synchronously to the messenger's target,
|
||||||
without waiting for a reply.
|
without waiting for a reply.
|
||||||
|
|
||||||
@@ -311,17 +311,17 @@ status_t
|
|||||||
BMessenger::SendMessage(BMessage *message, BHandler *replyTo,
|
BMessenger::SendMessage(BMessage *message, BHandler *replyTo,
|
||||||
bigtime_t timeout) const
|
bigtime_t timeout) const
|
||||||
{
|
{
|
||||||
DBG(OUT("BMessenger::SendMessage2(%.4s)\n", (char*)&message->what));
|
DBG(OUT("BMessenger::SendMessage2(%.4s)\n", (char*)&message->what));
|
||||||
status_t error = (message ? B_OK : B_BAD_VALUE);
|
status_t error = (message ? B_OK : B_BAD_VALUE);
|
||||||
if (error == B_OK) {
|
if (error == B_OK) {
|
||||||
BMessenger replyMessenger(replyTo);
|
BMessenger replyMessenger(replyTo);
|
||||||
error = SendMessage(message, replyMessenger, timeout);
|
error = SendMessage(message, replyMessenger, timeout);
|
||||||
}
|
}
|
||||||
DBG(OUT("BMessenger::SendMessage2() done: %lx\n", error));
|
DBG(OUT("BMessenger::SendMessage2() done: %lx\n", error));
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendMessage
|
|
||||||
/*! \brief Delivers a BMessage synchronously to the messenger's target,
|
/*! \brief Delivers a BMessage synchronously to the messenger's target,
|
||||||
without waiting for a reply.
|
without waiting for a reply.
|
||||||
|
|
||||||
@@ -356,7 +356,7 @@ BMessenger::SendMessage(BMessage *message, BMessenger replyTo,
|
|||||||
timeout, false, replyTo);
|
timeout, false, replyTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendMessage
|
|
||||||
/*! \brief Delivers a BMessage synchronously to the messenger's target and
|
/*! \brief Delivers a BMessage synchronously to the messenger's target and
|
||||||
waits for a reply.
|
waits for a reply.
|
||||||
|
|
||||||
@@ -380,7 +380,7 @@ BMessenger::SendMessage(uint32 command, BMessage *reply) const
|
|||||||
return SendMessage(&message, reply);
|
return SendMessage(&message, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendMessage
|
|
||||||
/*! \brief Delivers a BMessage synchronously to the messenger's target and
|
/*! \brief Delivers a BMessage synchronously to the messenger's target and
|
||||||
waits for a reply.
|
waits for a reply.
|
||||||
|
|
||||||
@@ -606,4 +606,3 @@ operator!=(const BMessenger &a, const BMessenger &b)
|
|||||||
{
|
{
|
||||||
return !(a == b);
|
return !(a == b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user