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