More whitespace cleanup all over the place.
This commit is contained in:
parent
416255de4e
commit
e01de52283
@ -31,7 +31,7 @@ public:
|
||||
virtual BAlignment BaseAlignment();
|
||||
|
||||
virtual BRect Frame();
|
||||
virtual void SetFrame(BRect frame);
|
||||
virtual void SetFrame(BRect frame);
|
||||
|
||||
virtual bool IsVisible();
|
||||
virtual void SetVisible(bool visible);
|
||||
@ -42,7 +42,7 @@ public:
|
||||
|
||||
protected:
|
||||
// Archiving hook methods
|
||||
virtual status_t AllArchived(BMessage* archive) const;
|
||||
virtual status_t AllArchived(BMessage* archive) const;
|
||||
virtual status_t AllUnarchived(const BMessage* from);
|
||||
|
||||
virtual status_t ItemArchived(BMessage* into, BLayoutItem* item,
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
|
||||
orientation Orientation() const;
|
||||
void SetOrientation(orientation orientation);
|
||||
|
||||
|
||||
float ItemWeight(int32 index) const;
|
||||
void SetItemWeight(int32 index, float weight);
|
||||
|
||||
@ -40,7 +40,7 @@ public:
|
||||
|
||||
virtual status_t Perform(perform_code d, void* arg);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual status_t AllArchived(BMessage* into) const;
|
||||
virtual status_t AllUnarchived(const BMessage* from);
|
||||
virtual status_t ItemArchived(BMessage* into, BLayoutItem* item,
|
||||
@ -52,7 +52,7 @@ protected:
|
||||
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
|
||||
|
||||
virtual void PrepareItems(orientation orientation);
|
||||
|
||||
|
||||
virtual int32 InternalCountColumns();
|
||||
virtual int32 InternalCountRows();
|
||||
virtual void GetColumnRowConstraints(
|
||||
|
@ -448,7 +448,7 @@ extern status_t _kern_close_port(port_id id);
|
||||
extern status_t _kern_delete_port(port_id id);
|
||||
extern port_id _kern_find_port(const char *port_name);
|
||||
extern status_t _kern_get_port_info(port_id id, struct port_info *info);
|
||||
extern status_t _kern_get_next_port_info(team_id team, int32 *cookie,
|
||||
extern status_t _kern_get_next_port_info(team_id team, int32 *cookie,
|
||||
struct port_info *info);
|
||||
extern ssize_t _kern_port_buffer_size_etc(port_id port, uint32 flags,
|
||||
bigtime_t timeout);
|
||||
|
@ -51,7 +51,7 @@ struct BAbstractLayout::Proxy {
|
||||
|
||||
virtual bool IsVisible(bool ancestorHidden) const = 0;
|
||||
virtual void SetVisible(bool visible) = 0;
|
||||
|
||||
|
||||
virtual status_t AddDataToArchive(BMessage* archive,
|
||||
bool ancestorHidden) = 0;
|
||||
virtual status_t RestoreDataFromArchive(const BMessage* archive) = 0;
|
||||
|
@ -193,8 +193,8 @@ BCardLayout::DoLayout()
|
||||
size.width = max_c(size.width, fMin.width);
|
||||
size.height = max_c(size.height, fMin.height);
|
||||
}
|
||||
|
||||
if (fVisibleItem != NULL)
|
||||
|
||||
if (fVisibleItem != NULL)
|
||||
fVisibleItem->AlignInFrame(BRect(LayoutArea().LeftTop(), size));
|
||||
}
|
||||
|
||||
@ -258,7 +258,7 @@ BCardLayout::Instantiate(BMessage* from)
|
||||
return new BCardLayout(from);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool
|
||||
BCardLayout::ItemAdded(BLayoutItem* item, int32 atIndex)
|
||||
|
@ -1,22 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Marcus Overhagen
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
@ -26,9 +26,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <new>
|
||||
|
||||
|
||||
#define MAGIC1 0x9183f4d9
|
||||
#define MAGIC2 0xa6b3c87d
|
||||
|
||||
|
||||
struct BBlockCache::_FreeBlock {
|
||||
DEBUG_ONLY( uint32 magic1; )
|
||||
_FreeBlock *next;
|
||||
@ -42,16 +44,16 @@ struct BBlockCache::_FreeBlock {
|
||||
// Thus we need to create multiple small ones.
|
||||
// We maintain a list of free blocks.
|
||||
|
||||
BBlockCache::BBlockCache(uint32 blockCount,
|
||||
size_t blockSize,
|
||||
uint32 allocationType)
|
||||
: fFreeList(0),
|
||||
fBlockSize(blockSize),
|
||||
fFreeBlocks(0),
|
||||
fBlockCount(blockCount),
|
||||
BBlockCache::BBlockCache(uint32 blockCount, size_t blockSize,
|
||||
uint32 allocationType)
|
||||
:
|
||||
fFreeList(0),
|
||||
fBlockSize(blockSize),
|
||||
fFreeBlocks(0),
|
||||
fBlockCount(blockCount),
|
||||
fLocker("some BBlockCache lock"),
|
||||
fAlloc(0),
|
||||
fFree(0)
|
||||
fFree(0)
|
||||
{
|
||||
switch (allocationType) {
|
||||
case B_OBJECT_CACHE:
|
||||
@ -69,11 +71,11 @@ BBlockCache::BBlockCache(uint32 blockCount,
|
||||
// large enough to contain the _FreeBlock struct that is used.
|
||||
if (blockSize < sizeof(_FreeBlock))
|
||||
blockSize = sizeof(_FreeBlock);
|
||||
|
||||
|
||||
// should have at least one block
|
||||
if (blockCount == 0)
|
||||
blockCount = 1;
|
||||
|
||||
|
||||
// create blocks and put them into the free list
|
||||
while (blockCount--) {
|
||||
_FreeBlock *block = reinterpret_cast<_FreeBlock *>(fAlloc(blockSize));
|
||||
@ -87,6 +89,7 @@ BBlockCache::BBlockCache(uint32 blockCount,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BBlockCache::~BBlockCache()
|
||||
{
|
||||
// walk the free list and deallocate all blocks
|
||||
@ -102,6 +105,7 @@ BBlockCache::~BBlockCache()
|
||||
fLocker.Unlock();
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
BBlockCache::Get(size_t blockSize)
|
||||
{
|
||||
@ -126,6 +130,7 @@ BBlockCache::Get(size_t blockSize)
|
||||
return pointer;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BBlockCache::Save(void *pointer, size_t blockSize)
|
||||
{
|
||||
@ -146,5 +151,6 @@ BBlockCache::Save(void *pointer, size_t blockSize)
|
||||
fLocker.Unlock();
|
||||
}
|
||||
|
||||
|
||||
void BBlockCache::_ReservedBlockCache1() {}
|
||||
void BBlockCache::_ReservedBlockCache2() {}
|
||||
|
Loading…
Reference in New Issue
Block a user