style cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25173 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2ad7bf44d0
commit
a74d92608d
@ -172,7 +172,7 @@ BMediaEventLooper::SetRunMode(run_mode mode)
|
||||
priority = (mode == B_OFFLINE) ? min_c(B_NORMAL_PRIORITY, fSetPriority) : fSetPriority;
|
||||
if (priority != fCurrentPriority) {
|
||||
fCurrentPriority = priority;
|
||||
if(fControlThread > 0) {
|
||||
if (fControlThread > 0) {
|
||||
set_thread_priority(fControlThread, fCurrentPriority);
|
||||
fSchedulingLatency = estimate_max_scheduling_latency(fControlThread);
|
||||
printf("BMediaEventLooper: SchedulingLatency is %Ld\n", fSchedulingLatency);
|
||||
@ -355,7 +355,7 @@ BMediaEventLooper::SetPriority(int32 priority)
|
||||
fSetPriority = priority;
|
||||
fCurrentPriority = (RunMode() == B_OFFLINE) ? min_c(B_NORMAL_PRIORITY, fSetPriority) : fSetPriority;
|
||||
|
||||
if(fControlThread > 0) {
|
||||
if (fControlThread > 0) {
|
||||
set_thread_priority(fControlThread, fCurrentPriority);
|
||||
fSchedulingLatency = estimate_max_scheduling_latency(fControlThread);
|
||||
printf("BMediaEventLooper: SchedulingLatency is %Ld\n", fSchedulingLatency);
|
||||
|
@ -77,7 +77,7 @@ BMediaFiles::RewindTypes()
|
||||
BMediaFiles::GetNextType(BString *out_type)
|
||||
{
|
||||
CALLED();
|
||||
if(m_type_index < 0 || m_type_index >= m_types.CountItems()) {
|
||||
if (m_type_index < 0 || m_type_index >= m_types.CountItems()) {
|
||||
m_type_index = -1;
|
||||
return B_BAD_INDEX;
|
||||
}
|
||||
@ -111,7 +111,7 @@ BMediaFiles::RewindRefs(const char *type)
|
||||
return rv;
|
||||
}
|
||||
|
||||
if(reply.count>0) {
|
||||
if (reply.count>0) {
|
||||
char *items;
|
||||
area_id clone;
|
||||
|
||||
@ -142,7 +142,7 @@ BMediaFiles::GetNextRef(BString *out_type,
|
||||
entry_ref *out_ref)
|
||||
{
|
||||
CALLED();
|
||||
if(m_item_index < 0 || m_item_index >= m_items.CountItems()) {
|
||||
if (m_item_index < 0 || m_item_index >= m_items.CountItems()) {
|
||||
m_item_index = -1;
|
||||
return B_BAD_INDEX;
|
||||
}
|
||||
|
@ -2858,7 +2858,7 @@ BMediaRoster::GetInstancesFor(media_addon_id addon,
|
||||
return rv;
|
||||
}
|
||||
|
||||
if(io_count)
|
||||
if (io_count)
|
||||
*io_count = reply.count;
|
||||
if (reply.count > 0)
|
||||
memcpy(out_id, reply.node_id, sizeof(media_node_id) * reply.count);
|
||||
|
@ -600,20 +600,15 @@ BParameterWeb::Unflatten(type_code code, const void *buffer, ssize_t size)
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(mGroups != NULL)
|
||||
{
|
||||
for (int32 i = 0; i < mGroups->CountItems(); i++)
|
||||
{
|
||||
if (mGroups != NULL) {
|
||||
for (int32 i = 0; i < mGroups->CountItems(); i++) {
|
||||
BParameterGroup *CurrentItem = static_cast<BParameterGroup *>(mGroups->ItemAt(i));
|
||||
if(CurrentItem != NULL)
|
||||
{
|
||||
if (CurrentItem != NULL) {
|
||||
delete CurrentItem;
|
||||
}
|
||||
}
|
||||
mGroups->MakeEmpty();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
mGroups = new BList();
|
||||
}
|
||||
#endif
|
||||
@ -930,13 +925,11 @@ BParameterGroup::FlattenedSize() const
|
||||
//13 guaranteed bytes, variable after that.
|
||||
ssize_t size = 13;
|
||||
|
||||
if(mFlags != 0)
|
||||
{
|
||||
if (mFlags != 0) {
|
||||
size += 4;
|
||||
}
|
||||
|
||||
if(mName != NULL)
|
||||
{
|
||||
if (mName != NULL) {
|
||||
size += min_c(strlen(mName),255);
|
||||
}
|
||||
|
||||
@ -944,22 +937,18 @@ BParameterGroup::FlattenedSize() const
|
||||
int limit;
|
||||
|
||||
limit = mControls->CountItems();
|
||||
for(i = 0; i < limit; i++)
|
||||
{
|
||||
for (i = 0; i < limit; i++) {
|
||||
BParameter *CurrentParameter = static_cast<BParameter *>(mControls->ItemAt(i));
|
||||
if(CurrentParameter != NULL)
|
||||
{
|
||||
if (CurrentParameter != NULL) {
|
||||
//overhead for each parameter flattened
|
||||
size += 16 + CurrentParameter->FlattenedSize();
|
||||
}
|
||||
}
|
||||
|
||||
limit = mGroups->CountItems();
|
||||
for(i = 0; i < limit; i++)
|
||||
{
|
||||
for (i = 0; i < limit; i++) {
|
||||
BParameterGroup *CurrentGroup = static_cast<BParameterGroup *>(mGroups->ItemAt(i));
|
||||
if(CurrentGroup != NULL)
|
||||
{
|
||||
if (CurrentGroup != NULL) {
|
||||
//overhead for each group flattened
|
||||
size += 16 + CurrentGroup->FlattenedSize();
|
||||
}
|
||||
@ -1107,37 +1096,27 @@ BParameterGroup::Unflatten(type_code code, const void *buffer, ssize_t size)
|
||||
#if 0
|
||||
//Clear all existing parameters/subgroups
|
||||
int i;
|
||||
if(mControls != NULL)
|
||||
{
|
||||
for(i = 0; i < mControls->CountItems(); i++)
|
||||
{
|
||||
if (mControls != NULL) {
|
||||
for(i = 0; i < mControls->CountItems(); i++) {
|
||||
BParameter *CurrentItem = static_cast<BParameter *>(mControls->ItemAt(i));
|
||||
if(CurrentItem != NULL)
|
||||
{
|
||||
if (CurrentItem != NULL) {
|
||||
delete CurrentItem;
|
||||
}
|
||||
}
|
||||
mControls->MakeEmpty();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
mControls = new BList();
|
||||
}
|
||||
|
||||
if(mGroups != NULL)
|
||||
{
|
||||
for(i = 0; i < mGroups->CountItems(); i++)
|
||||
{
|
||||
if (mGroups != NULL) {
|
||||
for (i = 0; i < mGroups->CountItems(); i++) {
|
||||
BParameterGroup *CurrentItem = static_cast<BParameterGroup *>(mGroups->ItemAt(i));
|
||||
if(CurrentItem != NULL)
|
||||
{
|
||||
if (CurrentItem != NULL) {
|
||||
delete CurrentItem;
|
||||
}
|
||||
}
|
||||
mGroups->MakeEmpty();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
mGroups = new BList();
|
||||
}
|
||||
#endif
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include <MediaDefs.h>
|
||||
#include <Locker.h>
|
||||
#include "debug.h"
|
||||
|
||||
struct _event_queue_imp
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user