Code style correction by Barret, ticket #7453. Thanks!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41263 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström
2011-04-18 11:27:43 +00:00
parent 22c7e6324c
commit e1b526b95a
20 changed files with 185 additions and 133 deletions
+5 -1
View File
@@ -5,18 +5,21 @@
#include "AddOnImage.h"
// constructor
AddOnImage::AddOnImage()
: fID(-1)
{
}
// destructor
AddOnImage::~AddOnImage()
{
Unload();
}
// Load
status_t
AddOnImage::Load(const char* path)
@@ -33,6 +36,7 @@ AddOnImage::Load(const char *path)
return error;
}
// Unload
void
AddOnImage::Unload()
@@ -43,6 +47,7 @@ AddOnImage::Unload()
}
}
// SetID
void
AddOnImage::SetID(image_id id)
@@ -51,4 +56,3 @@ AddOnImage::SetID(image_id id)
if (id >= 0)
fID = id;
}
+38 -4
View File
@@ -75,11 +75,13 @@ const uint32 LARGE_ICON_TYPE = 'ICON';
/*! \brief Creates an uninitialized BAppFileInfo object.
*/
BAppFileInfo::BAppFileInfo()
: fResources(NULL),
:
fResources(NULL),
fWhere(B_USE_BOTH_LOCATIONS)
{
}
// constructor
/*! \brief Creates an BAppFileInfo object and initializes it to the supplied
file.
@@ -91,12 +93,14 @@ BAppFileInfo::BAppFileInfo()
\param file The file the object shall be initialized to.
*/
BAppFileInfo::BAppFileInfo(BFile* file)
: fResources(NULL),
:
fResources(NULL),
fWhere(B_USE_BOTH_LOCATIONS)
{
SetTo(file);
}
// destructor
/*! \brief Frees all resources associated with this object.
@@ -107,6 +111,7 @@ BAppFileInfo::~BAppFileInfo()
delete fResources;
}
// SetTo
/*! \brief Initializes the BAppFileInfo to the supplied file.
@@ -174,6 +179,7 @@ BAppFileInfo::SetTo(BFile *file)
return error;
}
// GetType
/*! \brief Gets the file's MIME type.
@@ -213,6 +219,7 @@ BAppFileInfo::GetType(char *type) const
return error;
}
// SetType
/*! \brief Sets the file's MIME type.
@@ -251,6 +258,7 @@ BAppFileInfo::SetType(const char *type)
return error;
}
// GetSignature
/*! \brief Gets the file's application signature.
@@ -278,8 +286,8 @@ BAppFileInfo::GetSignature(char *signature) const
size_t read = 0;
if (error == B_OK) {
error = _ReadData(kSignatureAttribute, kSignatureResourceID,
B_MIME_STRING_TYPE, signature, B_MIME_TYPE_LENGTH,
read);
B_MIME_STRING_TYPE, signature,
B_MIME_TYPE_LENGTH, read);
}
// check the read data -- null terminate the string
if (error == B_OK && signature[read - 1] != '\0') {
@@ -291,6 +299,7 @@ BAppFileInfo::GetSignature(char *signature) const
return error;
}
// SetSignature
/*! \brief Sets the file's application signature.
@@ -439,6 +448,7 @@ BAppFileInfo::GetAppFlags(uint32 *flags) const
return error;
}
// SetAppFlags
/*! \brief Sets the file's application flags.
\param flags The application flags to be assigned to the file.
@@ -462,6 +472,7 @@ BAppFileInfo::SetAppFlags(uint32 flags)
return error;
}
// RemoveAppFlags
/*! \brief Removes the file's application flags.
\return
@@ -483,6 +494,7 @@ BAppFileInfo::RemoveAppFlags()
return error;
}
// GetSupportedTypes
/*! \brief Gets the MIME types supported by the application.
@@ -522,6 +534,7 @@ BAppFileInfo::GetSupportedTypes(BMessage *types) const
return error;
}
// SetSupportedTypes
/*! \brief Sets the MIME types supported by the application.
@@ -603,6 +616,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
return error;
}
// SetSupportedTypes
/*! \brief Sets the MIME types supported by the application.
@@ -622,6 +636,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types)
return SetSupportedTypes(types, false);
}
// IsSupportedType
/*! \brief Returns whether the application supports the supplied MIME type.
@@ -658,6 +673,7 @@ BAppFileInfo::IsSupportedType(const char *type) const
return found;
}
// Supports
/*! \brief Returns whether the application supports the supplied MIME type
explicitly.
@@ -691,6 +707,7 @@ BAppFileInfo::Supports(BMimeType *type) const
return found;
}
// GetIcon
/*! \brief Gets the file's icon.
\param icon A pointer to a pre-allocated BBitmap of the correct dimension
@@ -711,6 +728,7 @@ BAppFileInfo::GetIcon(BBitmap *icon, icon_size which) const
return GetIconForType(NULL, icon, which);
}
// GetIcon
/*! \brief Gets the file's icon.
\param data The pointer in which the flat icon data will be returned.
@@ -727,6 +745,7 @@ BAppFileInfo::GetIcon(uint8** data, size_t* size) const
return GetIconForType(NULL, data, size);
}
// SetIcon
/*! \brief Sets the file's icon.
@@ -749,6 +768,7 @@ BAppFileInfo::SetIcon(const BBitmap *icon, icon_size which)
return SetIconForType(NULL, icon, which);
}
// SetIcon
/*! \brief Sets the file's icon.
@@ -769,6 +789,7 @@ BAppFileInfo::SetIcon(const uint8* data, size_t size)
return SetIconForType(NULL, data, size);
}
// GetVersionInfo
/*! \brief Gets the file's version info.
\param info A pointer to a pre-allocated version_info structure into which
@@ -829,6 +850,7 @@ BAppFileInfo::GetVersionInfo(version_info *info, version_kind kind) const
return B_OK;
}
// SetVersionInfo
/*! \brief Sets the file's version info.
@@ -897,6 +919,7 @@ BAppFileInfo::SetVersionInfo(const version_info *info, version_kind kind)
return error;
}
// GetIconForType
/*! \brief Gets the icon the application provides for a given MIME type.
@@ -1039,6 +1062,7 @@ BAppFileInfo::GetIconForType(const char* type, BBitmap* icon,
return error;
}
// GetIconForType
/*! \brief Gets the icon the application provides for a given MIME type.
@@ -1089,6 +1113,7 @@ BAppFileInfo::GetIconForType(const char *type, uint8** data,
return B_OK;
}
// SetIconForType
/*! \brief Sets the icon the application provides for a given MIME type.
@@ -1193,6 +1218,7 @@ BAppFileInfo::SetIconForType(const char *type, const BBitmap *icon,
return error;
}
// SetIconForType
/*! \brief Sets the icon the application provides for a given MIME type.
@@ -1254,6 +1280,7 @@ BAppFileInfo::SetIconForType(const char* type, const uint8* data,
return error;
}
// SetInfoLocation
/*! \brief Specifies the location where the meta data shall be stored.
@@ -1286,6 +1313,7 @@ BAppFileInfo::IsUsingAttributes() const
return (fWhere & B_USE_ATTRIBUTES) != 0;
}
// IsUsingResources
/*! \brief Returns whether the object stores the meta data (also) in the
file's resources.
@@ -1298,11 +1326,13 @@ BAppFileInfo::IsUsingResources() const
return (fWhere & B_USE_RESOURCES) != 0;
}
// FBC
void BAppFileInfo::_ReservedAppFileInfo1() {}
void BAppFileInfo::_ReservedAppFileInfo2() {}
void BAppFileInfo::_ReservedAppFileInfo3() {}
// =
/*! \brief Privatized assignment operator to prevent usage.
*/
@@ -1312,6 +1342,7 @@ BAppFileInfo::operator=(const BAppFileInfo &)
return *this;
}
// copy constructor
/*! \brief Privatized copy constructor to prevent usage.
*/
@@ -1319,6 +1350,7 @@ BAppFileInfo::BAppFileInfo(const BAppFileInfo &)
{
}
// GetMetaMime
/*! \brief Initializes a BMimeType to the file's signature.
@@ -1348,6 +1380,7 @@ BAppFileInfo::GetMetaMime(BMimeType *meta) const
return error;
}
// _ReadData
/*! \brief Reads data from an attribute or resource.
@@ -1465,6 +1498,7 @@ BAppFileInfo::_ReadData(const char *name, int32 id, type_code type,
return error;
}
// _WriteData
/*! \brief Writes data to an attribute or resource.
+3 -4
View File
@@ -9,6 +9,7 @@
#include <EntryList.h>
// constructor
//! Creates a BEntryList.
/*! Does nothing at this time.
@@ -17,6 +18,7 @@ BEntryList::BEntryList()
{
}
// destructor
//! Frees all resources associated with this BEntryList.
/*! Does nothing at this time.
@@ -25,6 +27,7 @@ BEntryList::~BEntryList()
{
}
// GetNextEntry
/*! \fn status_t BEntryList::GetNextEntry(BEntry *entry, bool traverse)
\brief Returns the BEntryList's next entry as a BEntry.
@@ -104,7 +107,3 @@ void BEntryList::_ReservedEntryList5() {}
void BEntryList::_ReservedEntryList6() {}
void BEntryList::_ReservedEntryList7() {}
void BEntryList::_ReservedEntryList8() {}
+2 -1
View File
@@ -47,7 +47,8 @@
/*! \brief Creates an uninitialized BDiskDevice object.
*/
BDiskDevice::BDiskDevice()
: fDeviceData(NULL)
:
fDeviceData(NULL)
{
}
@@ -11,7 +11,8 @@
// constructor
DiskDeviceJob::DiskDeviceJob(PartitionReference* partition,
PartitionReference* child)
: fPartition(partition),
:
fPartition(partition),
fChild(child)
{
if (fPartition)
@@ -15,6 +15,7 @@ BDiskScannerPartitionAddOn::BDiskScannerPartitionAddOn()
{
}
// destructor
/*! \brief Frees all resources associated with this object.
*/
@@ -71,6 +72,7 @@ BDiskScannerFSAddOn::BDiskScannerFSAddOn()
{
}
// destructor
/*! \brief Frees all resources associated with this object.
*/
@@ -128,6 +130,7 @@ BDiskScannerParameterEditor::BDiskScannerParameterEditor()
{
}
// destructor
/*! \brief Frees all resources associated with this object.
*/
@@ -135,6 +138,7 @@ BDiskScannerParameterEditor::~BDiskScannerParameterEditor()
{
}
/*! \brief Returns a view containing the controls needed for editing the
parameters.
@@ -155,6 +159,7 @@ BDiskScannerParameterEditor::View()
return NULL;
}
// EditingDone
/*! \brief Called when the user finishes editing the parameters.
@@ -174,6 +179,7 @@ BDiskScannerParameterEditor::EditingDone()
return true;
}
/*! \brief Returns the edited parameters.
To be overridden by derived classes.
@@ -14,7 +14,8 @@
// constructor
BDiskSystemAddOn::BDiskSystemAddOn(const char* name, uint32 flags)
: fName(name),
:
fName(name),
fFlags(flags)
{
}
@@ -98,7 +99,8 @@ BDiskSystemAddOn::IsSubSystemFor(const BMutablePartition* child)
// constructor
BPartitionHandle::BPartitionHandle(BMutablePartition* partition)
: fPartition(partition)
:
fPartition(partition)
{
}
@@ -21,7 +21,8 @@
// constructor
BPartition::Delegate::Delegate(BPartition* partition)
: fPartition(partition),
:
fPartition(partition),
fMutablePartition(this),
fDiskSystem(NULL),
fPartitionHandle(NULL)
@@ -359,8 +360,8 @@ BPartition::Delegate::SetParameters(Delegate* child, const char* parameters)
// GetNextSupportedChildType
status_t
BPartition::Delegate::GetNextSupportedChildType(Delegate* child, int32 *cookie,
BString* type) const
BPartition::Delegate::GetNextSupportedChildType(Delegate* child,
int32* cookie, BString* type) const
{
TRACE("%p->BPartition::Delegate::GetNextSupportedChildType(child: %p, "
"cookie: %ld)\n", this, child, *cookie);
@@ -377,7 +378,8 @@ BPartition::Delegate::GetNextSupportedChildType(Delegate* child, int32 *cookie,
// IsSubSystem
bool
BPartition::Delegate::IsSubSystem(Delegate* child, const char* diskSystem) const
BPartition::Delegate::IsSubSystem(Delegate* child,
const char* diskSystem) const
{
// get the disk system add-on
DiskSystemAddOnManager* manager = DiskSystemAddOnManager::Default();
@@ -28,7 +28,8 @@ using namespace std;
// constructor
BPartitioningInfo::BPartitioningInfo()
: fPartitionID(-1),
:
fPartitionID(-1),
fSpaces(NULL),
fCount(0),
fCapacity(0)
@@ -12,7 +12,8 @@
// constructor
RepairJob::RepairJob(PartitionReference* partition, bool checkOnly)
: DiskDeviceJob(partition),
:
DiskDeviceJob(partition),
fCheckOnly(checkOnly)
{
}
@@ -14,7 +14,8 @@
// constructor
ResizeJob::ResizeJob(PartitionReference* partition, PartitionReference* child,
off_t size, off_t contentSize)
: DiskDeviceJob(partition, child),
:
DiskDeviceJob(partition, child),
fSize(size),
fContentSize(contentSize)
{