More whitespace cleanup all over the place.

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