style cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25173 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -600,20 +600,15 @@ BParameterWeb::Unflatten(type_code code, const void *buffer, ssize_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if(mGroups != NULL)
|
if (mGroups != NULL) {
|
||||||
{
|
for (int32 i = 0; i < mGroups->CountItems(); i++) {
|
||||||
for (int32 i = 0; i < mGroups->CountItems(); i++)
|
|
||||||
{
|
|
||||||
BParameterGroup *CurrentItem = static_cast<BParameterGroup *>(mGroups->ItemAt(i));
|
BParameterGroup *CurrentItem = static_cast<BParameterGroup *>(mGroups->ItemAt(i));
|
||||||
if(CurrentItem != NULL)
|
if (CurrentItem != NULL) {
|
||||||
{
|
|
||||||
delete CurrentItem;
|
delete CurrentItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mGroups->MakeEmpty();
|
mGroups->MakeEmpty();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
mGroups = new BList();
|
mGroups = new BList();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -930,13 +925,11 @@ BParameterGroup::FlattenedSize() const
|
|||||||
//13 guaranteed bytes, variable after that.
|
//13 guaranteed bytes, variable after that.
|
||||||
ssize_t size = 13;
|
ssize_t size = 13;
|
||||||
|
|
||||||
if(mFlags != 0)
|
if (mFlags != 0) {
|
||||||
{
|
|
||||||
size += 4;
|
size += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mName != NULL)
|
if (mName != NULL) {
|
||||||
{
|
|
||||||
size += min_c(strlen(mName),255);
|
size += min_c(strlen(mName),255);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -944,22 +937,18 @@ BParameterGroup::FlattenedSize() const
|
|||||||
int limit;
|
int limit;
|
||||||
|
|
||||||
limit = mControls->CountItems();
|
limit = mControls->CountItems();
|
||||||
for(i = 0; i < limit; i++)
|
for (i = 0; i < limit; i++) {
|
||||||
{
|
|
||||||
BParameter *CurrentParameter = static_cast<BParameter *>(mControls->ItemAt(i));
|
BParameter *CurrentParameter = static_cast<BParameter *>(mControls->ItemAt(i));
|
||||||
if(CurrentParameter != NULL)
|
if (CurrentParameter != NULL) {
|
||||||
{
|
|
||||||
//overhead for each parameter flattened
|
//overhead for each parameter flattened
|
||||||
size += 16 + CurrentParameter->FlattenedSize();
|
size += 16 + CurrentParameter->FlattenedSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
limit = mGroups->CountItems();
|
limit = mGroups->CountItems();
|
||||||
for(i = 0; i < limit; i++)
|
for (i = 0; i < limit; i++) {
|
||||||
{
|
|
||||||
BParameterGroup *CurrentGroup = static_cast<BParameterGroup *>(mGroups->ItemAt(i));
|
BParameterGroup *CurrentGroup = static_cast<BParameterGroup *>(mGroups->ItemAt(i));
|
||||||
if(CurrentGroup != NULL)
|
if (CurrentGroup != NULL) {
|
||||||
{
|
|
||||||
//overhead for each group flattened
|
//overhead for each group flattened
|
||||||
size += 16 + CurrentGroup->FlattenedSize();
|
size += 16 + CurrentGroup->FlattenedSize();
|
||||||
}
|
}
|
||||||
@@ -1107,37 +1096,27 @@ BParameterGroup::Unflatten(type_code code, const void *buffer, ssize_t size)
|
|||||||
#if 0
|
#if 0
|
||||||
//Clear all existing parameters/subgroups
|
//Clear all existing parameters/subgroups
|
||||||
int i;
|
int i;
|
||||||
if(mControls != NULL)
|
if (mControls != NULL) {
|
||||||
{
|
for(i = 0; i < mControls->CountItems(); i++) {
|
||||||
for(i = 0; i < mControls->CountItems(); i++)
|
|
||||||
{
|
|
||||||
BParameter *CurrentItem = static_cast<BParameter *>(mControls->ItemAt(i));
|
BParameter *CurrentItem = static_cast<BParameter *>(mControls->ItemAt(i));
|
||||||
if(CurrentItem != NULL)
|
if (CurrentItem != NULL) {
|
||||||
{
|
|
||||||
delete CurrentItem;
|
delete CurrentItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mControls->MakeEmpty();
|
mControls->MakeEmpty();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
mControls = new BList();
|
mControls = new BList();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mGroups != NULL)
|
if (mGroups != NULL) {
|
||||||
{
|
for (i = 0; i < mGroups->CountItems(); i++) {
|
||||||
for(i = 0; i < mGroups->CountItems(); i++)
|
|
||||||
{
|
|
||||||
BParameterGroup *CurrentItem = static_cast<BParameterGroup *>(mGroups->ItemAt(i));
|
BParameterGroup *CurrentItem = static_cast<BParameterGroup *>(mGroups->ItemAt(i));
|
||||||
if(CurrentItem != NULL)
|
if (CurrentItem != NULL) {
|
||||||
{
|
|
||||||
delete CurrentItem;
|
delete CurrentItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mGroups->MakeEmpty();
|
mGroups->MakeEmpty();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
mGroups = new BList();
|
mGroups = new BList();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <MediaDefs.h>
|
#include <MediaDefs.h>
|
||||||
#include <Locker.h>
|
#include <Locker.h>
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
struct _event_queue_imp
|
struct _event_queue_imp
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user