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
+6 -2
View File
@@ -5,21 +5,24 @@
#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)
{ {
Unload(); Unload();
status_t error = (path ? B_OK : B_BAD_VALUE); status_t error = (path ? B_OK : B_BAD_VALUE);
@@ -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;
} }
+1 -1
View File
@@ -15,7 +15,7 @@ public:
AddOnImage(); AddOnImage();
~AddOnImage(); ~AddOnImage();
status_t Load(const char *path); status_t Load(const char* path);
void Unload(); void Unload();
void SetID(image_id id); void SetID(image_id id);
+1 -1
View File
@@ -213,7 +213,7 @@ AddOnMonitorHandler::EntryRemoved(const char* name, ino_t directory,
void void
AddOnMonitorHandler::EntryMoved(const char *name, const char *fromName, AddOnMonitorHandler::EntryMoved(const char* name, const char* fromName,
ino_t fromDirectory, ino_t toDirectory, dev_t device, ino_t node, ino_t fromDirectory, ino_t toDirectory, dev_t device, ino_t node,
dev_t nodeDevice) dev_t nodeDevice)
{ {
+80 -46
View File
@@ -26,17 +26,17 @@
using namespace std; using namespace std;
// attributes // attributes
static const char *kTypeAttribute = "BEOS:TYPE"; static const char* kTypeAttribute = "BEOS:TYPE";
static const char *kSignatureAttribute = "BEOS:APP_SIG"; static const char* kSignatureAttribute = "BEOS:APP_SIG";
static const char *kAppFlagsAttribute = "BEOS:APP_FLAGS"; static const char* kAppFlagsAttribute = "BEOS:APP_FLAGS";
static const char *kSupportedTypesAttribute = "BEOS:FILE_TYPES"; static const char* kSupportedTypesAttribute = "BEOS:FILE_TYPES";
static const char *kVersionInfoAttribute = "BEOS:APP_VERSION"; static const char* kVersionInfoAttribute = "BEOS:APP_VERSION";
static const char *kMiniIconAttribute = "BEOS:M:"; static const char* kMiniIconAttribute = "BEOS:M:";
static const char *kLargeIconAttribute = "BEOS:L:"; static const char* kLargeIconAttribute = "BEOS:L:";
static const char *kIconAttribute = "BEOS:"; static const char* kIconAttribute = "BEOS:";
static const char *kStandardIconType = "STD_ICON"; static const char* kStandardIconType = "STD_ICON";
static const char *kIconType = "ICON"; static const char* kIconType = "ICON";
static const char *kCatalogEntryAttribute = "SYS:NAME"; static const char* kCatalogEntryAttribute = "SYS:NAME";
// resource IDs // resource IDs
static const int32 kTypeResourceID = 2; static const int32 kTypeResourceID = 2;
@@ -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.
@@ -90,13 +92,15 @@ 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.
@@ -228,7 +235,7 @@ BAppFileInfo::GetType(char *type) const
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::SetType(const char *type) BAppFileInfo::SetType(const char* type)
{ {
// check initialization // check initialization
status_t error = B_OK; status_t error = B_OK;
@@ -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.
@@ -268,7 +276,7 @@ BAppFileInfo::SetType(const char *type)
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::GetSignature(char *signature) const BAppFileInfo::GetSignature(char* signature) const
{ {
// check param and initialization // check param and initialization
status_t error = (signature ? B_OK : B_BAD_VALUE); status_t error = (signature ? B_OK : B_BAD_VALUE);
@@ -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.
@@ -306,7 +315,7 @@ BAppFileInfo::GetSignature(char *signature) const
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::SetSignature(const char *signature) BAppFileInfo::SetSignature(const char* signature)
{ {
// check initialization // check initialization
status_t error = B_OK; status_t error = B_OK;
@@ -388,7 +397,7 @@ BAppFileInfo::GetCatalogEntry(char *catalogEntry) const
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::SetCatalogEntry(const char *catalogEntry) BAppFileInfo::SetCatalogEntry(const char* catalogEntry)
{ {
if (InitCheck() != B_OK) if (InitCheck() != B_OK)
return B_NO_INIT; return B_NO_INIT;
@@ -420,7 +429,7 @@ BAppFileInfo::SetCatalogEntry(const char *catalogEntry)
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::GetAppFlags(uint32 *flags) const BAppFileInfo::GetAppFlags(uint32* flags) const
{ {
// check param and initialization // check param and initialization
status_t error = (flags ? B_OK : B_BAD_VALUE); status_t error = (flags ? B_OK : B_BAD_VALUE);
@@ -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.
@@ -501,7 +513,7 @@ BAppFileInfo::RemoveAppFlags()
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::GetSupportedTypes(BMessage *types) const BAppFileInfo::GetSupportedTypes(BMessage* types) const
{ {
// check param and initialization // check param and initialization
status_t error = (types ? B_OK : B_BAD_VALUE); status_t error = (types ? B_OK : B_BAD_VALUE);
@@ -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.
@@ -549,7 +562,7 @@ BAppFileInfo::GetSupportedTypes(BMessage *types) const
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll) BAppFileInfo::SetSupportedTypes(const BMessage* types, bool syncAll)
{ {
// check initialization // check initialization
status_t error = B_OK; status_t error = B_OK;
@@ -562,7 +575,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
error = B_OK; error = B_OK;
if (types) { if (types) {
// check param -- supported types must be valid // check param -- supported types must be valid
const char *type; const char* type;
for (int32 i = 0; for (int32 i = 0;
error == B_OK && types->FindString("types", i, &type) == B_OK; error == B_OK && types->FindString("types", i, &type) == B_OK;
i++) { i++) {
@@ -577,7 +590,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
error = size; error = size;
} }
// allocate a buffer for the flattened data // allocate a buffer for the flattened data
char *buffer = NULL; char* buffer = NULL;
if (error == B_OK) { if (error == B_OK) {
buffer = new(nothrow) char[size]; buffer = new(nothrow) char[size];
if (!buffer) if (!buffer)
@@ -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.
@@ -617,11 +631,12 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::SetSupportedTypes(const BMessage *types) 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.
@@ -633,7 +648,7 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types)
the application, \c false otherwise. the application, \c false otherwise.
*/ */
bool bool
BAppFileInfo::IsSupportedType(const char *type) const BAppFileInfo::IsSupportedType(const char* type) const
{ {
status_t error = (type ? B_OK : B_BAD_VALUE); status_t error = (type ? B_OK : B_BAD_VALUE);
// get the supported types // get the supported types
@@ -647,7 +662,7 @@ BAppFileInfo::IsSupportedType(const char *type) const
// iterate through the supported types // iterate through the supported types
bool found = false; bool found = false;
if (error == B_OK) { if (error == B_OK) {
const char *supportedType; const char* supportedType;
for (int32 i = 0; for (int32 i = 0;
!found && types.FindString("types", i, &supportedType) == B_OK; !found && types.FindString("types", i, &supportedType) == B_OK;
i++) { i++) {
@@ -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.
@@ -671,7 +687,7 @@ BAppFileInfo::IsSupportedType(const char *type) const
supported by the application, \c false otherwise. supported by the application, \c false otherwise.
*/ */
bool bool
BAppFileInfo::Supports(BMimeType *type) const BAppFileInfo::Supports(BMimeType* type) const
{ {
status_t error = (type && type->InitCheck() == B_OK ? B_OK : B_BAD_VALUE); status_t error = (type && type->InitCheck() == B_OK ? B_OK : B_BAD_VALUE);
// get the supported types // get the supported types
@@ -681,7 +697,7 @@ BAppFileInfo::Supports(BMimeType *type) const
// iterate through the supported types // iterate through the supported types
bool found = false; bool found = false;
if (error == B_OK) { if (error == B_OK) {
const char *supportedType; const char* supportedType;
for (int32 i = 0; for (int32 i = 0;
!found && types.FindString("types", i, &supportedType) == B_OK; !found && types.FindString("types", i, &supportedType) == B_OK;
i++) { i++) {
@@ -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
@@ -706,11 +723,12 @@ BAppFileInfo::Supports(BMimeType *type) const
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::GetIcon(BBitmap *icon, icon_size which) const 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.
@@ -744,11 +763,12 @@ BAppFileInfo::GetIcon(uint8** data, size_t* size) const
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::SetIcon(const BBitmap *icon, icon_size which) 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
@@ -784,7 +805,7 @@ BAppFileInfo::SetIcon(const uint8* data, size_t size)
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::GetVersionInfo(version_info *info, version_kind kind) const BAppFileInfo::GetVersionInfo(version_info* info, version_kind kind) const
{ {
// check params and initialization // check params and initialization
if (!info) if (!info)
@@ -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.
@@ -845,7 +867,7 @@ BAppFileInfo::GetVersionInfo(version_info *info, version_kind kind) const
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::SetVersionInfo(const version_info *info, version_kind kind) BAppFileInfo::SetVersionInfo(const version_info* info, version_kind kind)
{ {
// check initialization // check initialization
status_t error = B_OK; status_t error = B_OK;
@@ -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.
@@ -1056,7 +1080,7 @@ BAppFileInfo::GetIconForType(const char* type, BBitmap* icon,
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::GetIconForType(const char *type, uint8** data, BAppFileInfo::GetIconForType(const char* type, uint8** data,
size_t* size) const size_t* size) const
{ {
if (InitCheck() != B_OK) if (InitCheck() != B_OK)
@@ -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.
@@ -1113,7 +1138,7 @@ BAppFileInfo::GetIconForType(const char *type, uint8** data,
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::SetIconForType(const char *type, const BBitmap *icon, BAppFileInfo::SetIconForType(const char* type, const BBitmap* icon,
icon_size which) icon_size which)
{ {
status_t error = B_OK; status_t error = B_OK;
@@ -1154,7 +1179,7 @@ BAppFileInfo::SetIconForType(const char *type, const BBitmap *icon,
} else } else
attributeString += kStandardIconType; attributeString += kStandardIconType;
} }
const char *attribute = attributeString.String(); const char* attribute = attributeString.String();
// check parameter and initialization // check parameter and initialization
if (error == B_OK && icon if (error == B_OK && icon
&& (icon->InitCheck() != B_OK || icon->Bounds() != bounds)) { && (icon->InitCheck() != B_OK || icon->Bounds() != bounds)) {
@@ -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.
@@ -1234,7 +1260,7 @@ BAppFileInfo::SetIconForType(const char* type, const uint8* data,
} else } else
attributeString += kIconType; attributeString += kIconType;
const char *attribute = attributeString.String(); const char* attribute = attributeString.String();
status_t error; status_t error;
// write/remove the attribute // write/remove the attribute
@@ -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.
@@ -1335,7 +1367,7 @@ BAppFileInfo::BAppFileInfo(const BAppFileInfo &)
- other error codes - other error codes
*/ */
status_t status_t
BAppFileInfo::GetMetaMime(BMimeType *meta) const BAppFileInfo::GetMetaMime(BMimeType* meta) const
{ {
char signature[B_MIME_TYPE_LENGTH]; char signature[B_MIME_TYPE_LENGTH];
status_t error = GetSignature(signature); status_t error = GetSignature(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.
@@ -1371,9 +1404,9 @@ BAppFileInfo::GetMetaMime(BMimeType *meta) const
- error code - error code
*/ */
status_t status_t
BAppFileInfo::_ReadData(const char *name, int32 id, type_code type, BAppFileInfo::_ReadData(const char* name, int32 id, type_code type,
void *buffer, size_t bufferSize, void* buffer, size_t bufferSize,
size_t &bytesRead, void **allocatedBuffer) const size_t &bytesRead, void** allocatedBuffer) const
{ {
status_t error = B_OK; status_t error = B_OK;
@@ -1443,7 +1476,7 @@ BAppFileInfo::_ReadData(const char *name, int32 id, type_code type,
error = B_BAD_VALUE; error = B_BAD_VALUE;
// load resource // load resource
const void *resourceData = NULL; const void* resourceData = NULL;
if (error == B_OK) { if (error == B_OK) {
resourceData = fResources->LoadResource(type, name, &bytesRead); resourceData = fResources->LoadResource(type, name, &bytesRead);
if (resourceData && sizeFound == bytesRead) if (resourceData && sizeFound == bytesRead)
@@ -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.
@@ -1486,8 +1520,8 @@ BAppFileInfo::_ReadData(const char *name, int32 id, type_code type,
- error code - error code
*/ */
status_t status_t
BAppFileInfo::_WriteData(const char *name, int32 id, type_code type, BAppFileInfo::_WriteData(const char* name, int32 id, type_code type,
const void *buffer, size_t bufferSize, bool findID) const void* buffer, size_t bufferSize, bool findID)
{ {
if (!IsUsingAttributes() && !IsUsingResources()) if (!IsUsingAttributes() && !IsUsingResources())
return B_NO_INIT; return B_NO_INIT;
@@ -1535,7 +1569,7 @@ BAppFileInfo::_WriteData(const char *name, int32 id, type_code type,
- error code - error code
*/ */
status_t status_t
BAppFileInfo::_RemoveData(const char *name, type_code type) BAppFileInfo::_RemoveData(const char* name, type_code type)
{ {
if (!IsUsingAttributes() && !IsUsingResources()) if (!IsUsingAttributes() && !IsUsingResources())
return B_NO_INIT; return B_NO_INIT;
+4 -4
View File
@@ -643,7 +643,7 @@ BEntry::GetParent(BDirectory* dir) const
- "error code" - Failure - "error code" - Failure
*/ */
status_t status_t
BEntry::GetName(char *buffer) const BEntry::GetName(char* buffer) const
{ {
status_t result = B_ERROR; status_t result = B_ERROR;
@@ -681,7 +681,7 @@ BEntry::GetName(char *buffer) const
*/ */
status_t status_t
BEntry::Rename(const char *path, bool clobber) BEntry::Rename(const char* path, bool clobber)
{ {
// check parameter and initialization // check parameter and initialization
if (path == NULL) if (path == NULL)
@@ -780,7 +780,7 @@ BEntry::Remove()
\c false - The BEntry objects refer to different entries \c false - The BEntry objects refer to different entries
*/ */
bool bool
BEntry::operator==(const BEntry &item) const BEntry::operator==(const BEntry& item) const
{ {
// First check statuses // First check statuses
if (this->InitCheck() != B_OK && item.InitCheck() != B_OK) { if (this->InitCheck() != B_OK && item.InitCheck() != B_OK) {
@@ -951,7 +951,7 @@ BEntry::_SetTo(int dirFD, const char* path, bool traverse)
// if no directory was given, we need to open the current dir // if no directory was given, we need to open the current dir
// now // now
if (dirFD < 0) { if (dirFD < 0) {
char *cwd = getcwd(tmpPath, B_PATH_NAME_LENGTH); char* cwd = getcwd(tmpPath, B_PATH_NAME_LENGTH);
if (!cwd) if (!cwd)
return B_ERROR; return B_ERROR;
dirFD = _kern_open_dir(-1, cwd); dirFD = _kern_open_dir(-1, cwd);
+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() {}
+13 -13
View File
@@ -34,7 +34,7 @@ BFile::BFile()
/*! If \a file is uninitialized, the newly constructed BFile will be, too. /*! If \a file is uninitialized, the newly constructed BFile will be, too.
\param file the BFile object to be copied \param file the BFile object to be copied
*/ */
BFile::BFile(const BFile &file) BFile::BFile(const BFile& file)
: :
fMode(0) fMode(0)
{ {
@@ -48,7 +48,7 @@ BFile::BFile(const BFile &file)
\param openMode the mode in which the file should be opened \param openMode the mode in which the file should be opened
\see SetTo() for values for \a openMode \see SetTo() for values for \a openMode
*/ */
BFile::BFile(const entry_ref *ref, uint32 openMode) BFile::BFile(const entry_ref* ref, uint32 openMode)
: :
fMode(0) fMode(0)
{ {
@@ -62,7 +62,7 @@ BFile::BFile(const entry_ref *ref, uint32 openMode)
\param openMode the mode in which the file should be opened \param openMode the mode in which the file should be opened
\see SetTo() for values for \a openMode \see SetTo() for values for \a openMode
*/ */
BFile::BFile(const BEntry *entry, uint32 openMode) BFile::BFile(const BEntry* entry, uint32 openMode)
: :
fMode(0) fMode(0)
{ {
@@ -76,7 +76,7 @@ BFile::BFile(const BEntry *entry, uint32 openMode)
\param openMode the mode in which the file should be opened \param openMode the mode in which the file should be opened
\see SetTo() for values for \a openMode \see SetTo() for values for \a openMode
*/ */
BFile::BFile(const char *path, uint32 openMode) BFile::BFile(const char* path, uint32 openMode)
: :
fMode(0) fMode(0)
{ {
@@ -93,7 +93,7 @@ BFile::BFile(const char *path, uint32 openMode)
\param openMode the mode in which the file should be opened \param openMode the mode in which the file should be opened
\see SetTo() for values for \a openMode \see SetTo() for values for \a openMode
*/ */
BFile::BFile(const BDirectory *dir, const char *path, uint32 openMode) BFile::BFile(const BDirectory *dir, const char* path, uint32 openMode)
: :
fMode(0) fMode(0)
{ {
@@ -143,7 +143,7 @@ BFile::~BFile()
- \c B_NO_MORE_FDS: The application has run out of file descriptors. - \c B_NO_MORE_FDS: The application has run out of file descriptors.
*/ */
status_t status_t
BFile::SetTo(const entry_ref *ref, uint32 openMode) BFile::SetTo(const entry_ref* ref, uint32 openMode)
{ {
Unset(); Unset();
@@ -188,7 +188,7 @@ BFile::SetTo(const entry_ref *ref, uint32 openMode)
to reimplement! to reimplement!
*/ */
status_t status_t
BFile::SetTo(const BEntry *entry, uint32 openMode) BFile::SetTo(const BEntry* entry, uint32 openMode)
{ {
Unset(); Unset();
@@ -229,7 +229,7 @@ BFile::SetTo(const BEntry *entry, uint32 openMode)
- \c B_NO_MORE_FDS: The application has run out of file descriptors. - \c B_NO_MORE_FDS: The application has run out of file descriptors.
*/ */
status_t status_t
BFile::SetTo(const char *path, uint32 openMode) BFile::SetTo(const char* path, uint32 openMode)
{ {
Unset(); Unset();
@@ -271,7 +271,7 @@ BFile::SetTo(const char *path, uint32 openMode)
to reimplement! to reimplement!
*/ */
status_t status_t
BFile::SetTo(const BDirectory *dir, const char *path, uint32 openMode) BFile::SetTo(const BDirectory* dir, const char* path, uint32 openMode)
{ {
Unset(); Unset();
@@ -326,7 +326,7 @@ BFile::IsWritable() const
\return the number of bytes actually read or an error code \return the number of bytes actually read or an error code
*/ */
ssize_t ssize_t
BFile::Read(void *buffer, size_t size) BFile::Read(void* buffer, size_t size)
{ {
if (InitCheck() != B_OK) if (InitCheck() != B_OK)
return InitCheck(); return InitCheck();
@@ -343,7 +343,7 @@ BFile::Read(void *buffer, size_t size)
\return the number of bytes actually read or an error code \return the number of bytes actually read or an error code
*/ */
ssize_t ssize_t
BFile::ReadAt(off_t location, void *buffer, size_t size) BFile::ReadAt(off_t location, void* buffer, size_t size)
{ {
if (InitCheck() != B_OK) if (InitCheck() != B_OK)
return InitCheck(); return InitCheck();
@@ -360,7 +360,7 @@ BFile::ReadAt(off_t location, void *buffer, size_t size)
\return the number of bytes actually written or an error code \return the number of bytes actually written or an error code
*/ */
ssize_t ssize_t
BFile::Write(const void *buffer, size_t size) BFile::Write(const void* buffer, size_t size)
{ {
if (InitCheck() != B_OK) if (InitCheck() != B_OK)
return InitCheck(); return InitCheck();
@@ -377,7 +377,7 @@ BFile::Write(const void *buffer, size_t size)
\return the number of bytes actually written or an error code \return the number of bytes actually written or an error code
*/ */
ssize_t ssize_t
BFile::WriteAt(off_t location, const void *buffer, size_t size) BFile::WriteAt(off_t location, const void* buffer, size_t size)
{ {
if (InitCheck() != B_OK) if (InitCheck() != B_OK)
return InitCheck(); return InitCheck();
+4 -4
View File
@@ -28,7 +28,7 @@ BFileDescriptorIO::~BFileDescriptorIO()
ssize_t ssize_t
BFileDescriptorIO::Read(void *buffer, size_t size) BFileDescriptorIO::Read(void* buffer, size_t size)
{ {
ssize_t bytesRead = read(fFD, buffer, size); ssize_t bytesRead = read(fFD, buffer, size);
return bytesRead >= 0 ? bytesRead : errno; return bytesRead >= 0 ? bytesRead : errno;
@@ -36,7 +36,7 @@ BFileDescriptorIO::Read(void *buffer, size_t size)
ssize_t ssize_t
BFileDescriptorIO::Write(const void *buffer, size_t size) BFileDescriptorIO::Write(const void* buffer, size_t size)
{ {
ssize_t bytesWritten = write(fFD, buffer, size); ssize_t bytesWritten = write(fFD, buffer, size);
return bytesWritten >= 0 ? bytesWritten : errno; return bytesWritten >= 0 ? bytesWritten : errno;
@@ -44,7 +44,7 @@ BFileDescriptorIO::Write(const void *buffer, size_t size)
ssize_t ssize_t
BFileDescriptorIO::ReadAt(off_t position, void *buffer, size_t size) BFileDescriptorIO::ReadAt(off_t position, void* buffer, size_t size)
{ {
ssize_t bytesRead = pread(fFD, buffer, size, position); ssize_t bytesRead = pread(fFD, buffer, size, position);
return bytesRead >= 0 ? bytesRead : errno; return bytesRead >= 0 ? bytesRead : errno;
@@ -52,7 +52,7 @@ BFileDescriptorIO::ReadAt(off_t position, void *buffer, size_t size)
ssize_t ssize_t
BFileDescriptorIO::WriteAt(off_t position, const void *buffer, size_t size) BFileDescriptorIO::WriteAt(off_t position, const void* buffer, size_t size)
{ {
ssize_t bytesWritten = pwrite(fFD, buffer, size, position); ssize_t bytesWritten = pwrite(fFD, buffer, size, position);
return bytesWritten >= 0 ? bytesWritten : errno; return bytesWritten >= 0 ? bytesWritten : errno;
+4 -4
View File
@@ -26,7 +26,7 @@ BFileIO::~BFileIO()
ssize_t ssize_t
BFileIO::Read(void *buffer, size_t size) BFileIO::Read(void* buffer, size_t size)
{ {
errno = B_OK; errno = B_OK;
ssize_t bytesRead = fread(buffer, 1, size, fFile); ssize_t bytesRead = fread(buffer, 1, size, fFile);
@@ -35,7 +35,7 @@ BFileIO::Read(void *buffer, size_t size)
ssize_t ssize_t
BFileIO::Write(const void *buffer, size_t size) BFileIO::Write(const void* buffer, size_t size)
{ {
errno = B_OK; errno = B_OK;
ssize_t bytesRead = fwrite(buffer, 1, size, fFile); ssize_t bytesRead = fwrite(buffer, 1, size, fFile);
@@ -44,7 +44,7 @@ BFileIO::Write(const void *buffer, size_t size)
ssize_t ssize_t
BFileIO::ReadAt(off_t position, void *buffer, size_t size) BFileIO::ReadAt(off_t position, void* buffer, size_t size)
{ {
// save the old position and seek to the requested one // save the old position and seek to the requested one
off_t oldPosition = _Seek(position, SEEK_SET); off_t oldPosition = _Seek(position, SEEK_SET);
@@ -62,7 +62,7 @@ BFileIO::ReadAt(off_t position, void *buffer, size_t size)
ssize_t ssize_t
BFileIO::WriteAt(off_t position, const void *buffer, size_t size) BFileIO::WriteAt(off_t position, const void* buffer, size_t size)
{ {
// save the old position and seek to the requested one // save the old position and seek to the requested one
off_t oldPosition = _Seek(position, SEEK_SET); off_t oldPosition = _Seek(position, SEEK_SET);
+2 -2
View File
@@ -25,8 +25,8 @@
- another error code - another error code
*/ */
status_t status_t
find_directory(directory_which which, BPath *path, bool createIt, find_directory(directory_which which, BPath* path, bool createIt,
BVolume *volume) BVolume* volume)
{ {
if (path == NULL) if (path == NULL)
return B_BAD_VALUE; return B_BAD_VALUE;
+4 -3
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)
{ {
} }
@@ -223,12 +224,12 @@ BDiskDevice::IsModified() const
return false; return false;
struct IsModifiedVisitor : public BDiskDeviceVisitor { struct IsModifiedVisitor : public BDiskDeviceVisitor {
virtual bool Visit(BDiskDevice *device) virtual bool Visit(BDiskDevice* device)
{ {
return Visit(device, 0); return Visit(device, 0);
} }
virtual bool Visit(BPartition *partition, int32 level) virtual bool Visit(BPartition* partition, int32 level)
{ {
return partition->_IsModified(); return partition->_IsModified();
} }
@@ -11,8 +11,9 @@
// constructor // constructor
DiskDeviceJob::DiskDeviceJob(PartitionReference* partition, DiskDeviceJob::DiskDeviceJob(PartitionReference* partition,
PartitionReference* child) PartitionReference* child)
: fPartition(partition), :
fChild(child) fPartition(partition),
fChild(child)
{ {
if (fPartition) if (fPartition)
fPartition->AcquireReference(); fPartition->AcquireReference();
@@ -14,35 +14,35 @@
// Device Types // Device Types
const char *kDeviceTypeFloppyDisk = FLOPPY_DEVICE_NAME; const char* kDeviceTypeFloppyDisk = FLOPPY_DEVICE_NAME;
const char *kDeviceTypeHardDisk = HARD_DISK_DEVICE_NAME; const char* kDeviceTypeHardDisk = HARD_DISK_DEVICE_NAME;
const char *kDeviceTypeOptical = OPTICAL_DEVICE_NAME; const char* kDeviceTypeOptical = OPTICAL_DEVICE_NAME;
// Partition types // Partition types
const char *kPartitionTypeUnrecognized = UNRECOGNIZED_PARTITION_NAME; const char* kPartitionTypeUnrecognized = UNRECOGNIZED_PARTITION_NAME;
const char *kPartitionTypeMultisession = MULTISESSION_PARTITION_NAME; const char* kPartitionTypeMultisession = MULTISESSION_PARTITION_NAME;
const char *kPartitionTypeAudioSession = AUDIO_SESSION_PARTITION_NAME; const char* kPartitionTypeAudioSession = AUDIO_SESSION_PARTITION_NAME;
const char *kPartitionTypeDataSession = DATA_SESSION_PARTITION_NAME; const char* kPartitionTypeDataSession = DATA_SESSION_PARTITION_NAME;
const char *kPartitionTypeAmiga = AMIGA_PARTITION_NAME; const char* kPartitionTypeAmiga = AMIGA_PARTITION_NAME;
const char *kPartitionTypeApple = APPLE_PARTITION_NAME; const char* kPartitionTypeApple = APPLE_PARTITION_NAME;
const char *kPartitionTypeEFI = EFI_PARTITION_NAME; const char* kPartitionTypeEFI = EFI_PARTITION_NAME;
const char *kPartitionTypeIntel = INTEL_PARTITION_NAME; const char* kPartitionTypeIntel = INTEL_PARTITION_NAME;
const char *kPartitionTypeIntelExtended = INTEL_EXTENDED_PARTITION_NAME; const char* kPartitionTypeIntelExtended = INTEL_EXTENDED_PARTITION_NAME;
const char *kPartitionTypeVMDK = VMDK_PARTITION_NAME; const char* kPartitionTypeVMDK = VMDK_PARTITION_NAME;
const char *kPartitionTypeAmigaFFS = AMIGA_FFS_NAME; const char* kPartitionTypeAmigaFFS = AMIGA_FFS_NAME;
const char *kPartitionTypeBFS = BFS_NAME; const char* kPartitionTypeBFS = BFS_NAME;
const char *kPartitionTypeBTRFS = BTRFS_NAME; const char* kPartitionTypeBTRFS = BTRFS_NAME;
const char *kPartitionTypeEXFAT = EXFAT_FS_NAME; const char* kPartitionTypeEXFAT = EXFAT_FS_NAME;
const char *kPartitionTypeEXT2 = EXT2_FS_NAME; const char* kPartitionTypeEXT2 = EXT2_FS_NAME;
const char *kPartitionTypeEXT3 = EXT3_FS_NAME; const char* kPartitionTypeEXT3 = EXT3_FS_NAME;
const char *kPartitionTypeFAT12 = FAT12_FS_NAME; const char* kPartitionTypeFAT12 = FAT12_FS_NAME;
const char *kPartitionTypeFAT32 = FAT32_FS_NAME; const char* kPartitionTypeFAT32 = FAT32_FS_NAME;
const char *kPartitionTypeHFS = HFS_NAME; const char* kPartitionTypeHFS = HFS_NAME;
const char *kPartitionTypeHFSPlus = HFS_PLUS_NAME; const char* kPartitionTypeHFSPlus = HFS_PLUS_NAME;
const char *kPartitionTypeISO9660 = ISO9660_FS_NAME; const char* kPartitionTypeISO9660 = ISO9660_FS_NAME;
const char *kPartitionTypeReiser = REISER_FS_NAME; const char* kPartitionTypeReiser = REISER_FS_NAME;
const char *kPartitionTypeUDF = UDF_FS_NAME; const char* kPartitionTypeUDF = UDF_FS_NAME;
@@ -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,8 +14,9 @@
// constructor // constructor
BDiskSystemAddOn::BDiskSystemAddOn(const char* name, uint32 flags) BDiskSystemAddOn::BDiskSystemAddOn(const char* name, uint32 flags)
: fName(name), :
fFlags(flags) fName(name),
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,10 +21,11 @@
// constructor // constructor
BPartition::Delegate::Delegate(BPartition* partition) BPartition::Delegate::Delegate(BPartition* partition)
: fPartition(partition), :
fMutablePartition(this), fPartition(partition),
fDiskSystem(NULL), fMutablePartition(this),
fPartitionHandle(NULL) fDiskSystem(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();
@@ -75,7 +75,7 @@ public:
B_PARAMETER_EDITOR_TYPE type, B_PARAMETER_EDITOR_TYPE type,
BPartitionParameterEditor** editor) const; BPartitionParameterEditor** editor) const;
status_t GetNextSupportedChildType(Delegate* child, status_t GetNextSupportedChildType(Delegate* child,
int32 *cookie, BString* type) const; int32* cookie, BString* type) const;
bool IsSubSystem(Delegate* child, bool IsSubSystem(Delegate* child,
const char* diskSystem) const; const char* diskSystem) const;
@@ -28,10 +28,11 @@ using namespace std;
// constructor // constructor
BPartitioningInfo::BPartitioningInfo() BPartitioningInfo::BPartitioningInfo()
: fPartitionID(-1), :
fSpaces(NULL), fPartitionID(-1),
fCount(0), fSpaces(NULL),
fCapacity(0) fCount(0),
fCapacity(0)
{ {
} }
@@ -188,7 +189,7 @@ BPartitioningInfo::PartitionID() const
// GetPartitionableSpaceAt // GetPartitionableSpaceAt
status_t status_t
BPartitioningInfo::GetPartitionableSpaceAt(int32 index, off_t *offset, BPartitioningInfo::GetPartitionableSpaceAt(int32 index, off_t* offset,
off_t *size) const off_t *size) const
{ {
if (!fSpaces) if (!fSpaces)
@@ -12,8 +12,9 @@
// constructor // constructor
RepairJob::RepairJob(PartitionReference* partition, bool checkOnly) RepairJob::RepairJob(PartitionReference* partition, bool checkOnly)
: DiskDeviceJob(partition), :
fCheckOnly(checkOnly) DiskDeviceJob(partition),
fCheckOnly(checkOnly)
{ {
} }
@@ -14,9 +14,10 @@
// 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), :
fSize(size), DiskDeviceJob(partition, child),
fContentSize(contentSize) fSize(size),
fContentSize(contentSize)
{ {
} }