* fix gcc4 warning

* automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30584 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2009-05-02 19:02:27 +00:00
parent 5b3152c4fb
commit 5fac79601e
1 changed files with 19 additions and 18 deletions

View File

@ -155,7 +155,7 @@ BTranslatorRoster::Private::Private()
|| !strcasecmp(parameter, "enable") || !strcmp(parameter, "1")) || !strcasecmp(parameter, "enable") || !strcmp(parameter, "1"))
fSafeMode = true; fSafeMode = true;
} }
#ifdef HAIKU_TARGET_PLATFORM_HAIKU #ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (_kern_get_safemode_option(B_SAFEMODE_DISABLE_USER_ADD_ONS, parameter, &parameterLength) == B_OK) if (_kern_get_safemode_option(B_SAFEMODE_DISABLE_USER_ADD_ONS, parameter, &parameterLength) == B_OK)
#else #else
@ -193,7 +193,7 @@ BTranslatorRoster::Private::~Private()
while (iterator != fTranslators.end()) { while (iterator != fTranslators.end()) {
BTranslator* translator = iterator->second.translator; BTranslator* translator = iterator->second.translator;
translator->fOwningRoster = NULL; translator->fOwningRoster = NULL;
// we don't want to be notified about this anymore // we don't want to be notified about this anymore
@ -553,7 +553,7 @@ BTranslatorRoster::Private::CreateTranslators(const entry_ref& ref, int32& count
if (status == B_OK) { if (status == B_OK) {
// If the translator add-on supports the post R4.5 // If the translator add-on supports the post R4.5
// translator creation mechanism, keep loading translators // translator creation mechanism, keep loading translators
// until MakeNthTranslator stops returning them. // until MakeNthTranslator stops returning them.
BTranslator* translator = NULL; BTranslator* translator = NULL;
int32 created = 0; int32 created = 0;
for (int32 n = 0; (translator = makeNthTranslator(n, image, 0)) != NULL; n++) { for (int32 n = 0; (translator = makeNthTranslator(n, image, 0)) != NULL; n++) {
@ -627,7 +627,7 @@ status_t
BTranslatorRoster::Private::StopWatching(BMessenger target) BTranslatorRoster::Private::StopWatching(BMessenger target)
{ {
MessengerList::iterator iterator = fMessengers.begin(); MessengerList::iterator iterator = fMessengers.begin();
while (iterator != fMessengers.end()) { while (iterator != fMessengers.end()) {
if (*iterator == target) { if (*iterator == target) {
fMessengers.erase(iterator); fMessengers.erase(iterator);
@ -783,7 +783,7 @@ BTranslatorRoster::Private::GetAllTranslators(translator_id** _ids, int32* _coun
while (iterator != fTranslators.end()) { while (iterator != fTranslators.end()) {
array[count++] = iterator->first; array[count++] = iterator->first;
iterator++; iterator++;
} }
*_ids = array; *_ids = array;
*_count = count; *_count = count;
@ -882,8 +882,9 @@ BTranslatorRoster::Private::_CheckHints(const translation_format* formats,
// scan for suitable format // scan for suitable format
for (int32 i = 0; i < formatsCount && formats[i].type; i++) { for (int32 i = 0; i < formatsCount && formats[i].type; i++) {
if (formats[i].type == hintType if (formats[i].type == hintType
|| hintMIME && ((super && !strncmp(formats[i].MIME, hintMIME, super)) || (hintMIME
|| !strcmp(formats[i].MIME, hintMIME))) && ((super && !strncmp(formats[i].MIME, hintMIME, super))
|| !strcmp(formats[i].MIME, hintMIME))))
return &formats[i]; return &formats[i];
} }
@ -1138,7 +1139,7 @@ BTranslatorRoster::~BTranslatorRoster()
{ {
// If the default BTranslatorRoster is being // If the default BTranslatorRoster is being
// deleted, set the pointer to the default // deleted, set the pointer to the default
// BTranslatorRoster to NULL // BTranslatorRoster to NULL
if (sDefaultRoster == this) if (sDefaultRoster == this)
sDefaultRoster = NULL; sDefaultRoster = NULL;
@ -1159,7 +1160,7 @@ BTranslatorRoster::Archive(BMessage* into, bool deep) const
status_t status = BArchivable::Archive(into, deep); status_t status = BArchivable::Archive(into, deep);
if (status != B_OK) if (status != B_OK)
return status; return status;
return fPrivate->StoreTranslators(*into); return fPrivate->StoreTranslators(*into);
} }
@ -1240,7 +1241,7 @@ BTranslatorRoster::AddTranslators(const char* path)
BTranslatorRoster BTranslatorRoster
\return B_BAD_VALUE, if translator is NULL, \return B_BAD_VALUE, if translator is NULL,
B_OK if all went well B_OK if all went well
*/ */
status_t status_t
BTranslatorRoster::AddTranslator(BTranslator* translator) BTranslatorRoster::AddTranslator(BTranslator* translator)
@ -1281,7 +1282,7 @@ BTranslatorRoster::IsTranslator(entry_ref* ref)
/*! /*!
This function determines which translator is best suited This function determines which translator is best suited
to convert the data from \a source. to convert the data from \a source.
\param source the data to be identified \param source the data to be identified
\param ioExtension the configuration data for the translator \param ioExtension the configuration data for the translator
@ -1348,7 +1349,7 @@ BTranslatorRoster::GetTranslators(BPositionIO* source, BMessage* ioExtension,
Returns an array in \a _ids of all of the translators stored by this Returns an array in \a _ids of all of the translators stored by this
object. object.
You must free the array using delete[] when you are done with it. You must free the array using delete[] when you are done with it.
\param _ids the array is stored there (you own the array). \param _ids the array is stored there (you own the array).
\param _count number of IDs in the array. \param _count number of IDs in the array.
*/ */
@ -1385,7 +1386,7 @@ BTranslatorRoster::GetTranslatorInfo(translator_id id, const char** _name,
BAutolock locker(fPrivate); BAutolock locker(fPrivate);
BTranslator* translator = fPrivate->FindTranslator(id); BTranslator* translator = fPrivate->FindTranslator(id);
if (translator == NULL) if (translator == NULL)
return B_NO_TRANSLATOR; return B_NO_TRANSLATOR;
@ -1422,7 +1423,7 @@ BTranslatorRoster::GetInputFormats(translator_id id,
BAutolock locker(fPrivate); BAutolock locker(fPrivate);
BTranslator* translator = fPrivate->FindTranslator(id); BTranslator* translator = fPrivate->FindTranslator(id);
if (translator == NULL) if (translator == NULL)
return B_NO_TRANSLATOR; return B_NO_TRANSLATOR;
@ -1453,7 +1454,7 @@ BTranslatorRoster::GetOutputFormats(translator_id id,
BAutolock locker(fPrivate); BAutolock locker(fPrivate);
BTranslator* translator = fPrivate->FindTranslator(id); BTranslator* translator = fPrivate->FindTranslator(id);
if (translator == NULL) if (translator == NULL)
return B_NO_TRANSLATOR; return B_NO_TRANSLATOR;
@ -1573,7 +1574,7 @@ BTranslatorRoster::Translate(translator_id id, BPositionIO* source,
off_t pos = source->Seek(0, SEEK_SET); off_t pos = source->Seek(0, SEEK_SET);
if (pos == 0) { if (pos == 0) {
translator_info info; translator_info info;
status = translator->Identify(source, NULL, ioExtension, &info, wantOutType); status = translator->Identify(source, NULL, ioExtension, &info, wantOutType);
if (status >= B_OK) { if (status >= B_OK) {
off_t pos = source->Seek(0, SEEK_SET); off_t pos = source->Seek(0, SEEK_SET);
if (pos != 0) if (pos != 0)
@ -1613,7 +1614,7 @@ BTranslatorRoster::MakeConfigurationView(translator_id id, BMessage* ioExtension
BAutolock locker(fPrivate); BAutolock locker(fPrivate);
BTranslator* translator = fPrivate->FindTranslator(id); BTranslator* translator = fPrivate->FindTranslator(id);
if (translator == NULL) if (translator == NULL)
return B_NO_TRANSLATOR; return B_NO_TRANSLATOR;
@ -1640,7 +1641,7 @@ BTranslatorRoster::GetConfigurationMessage(translator_id id, BMessage* ioExtensi
BAutolock locker(fPrivate); BAutolock locker(fPrivate);
BTranslator* translator = fPrivate->FindTranslator(id); BTranslator* translator = fPrivate->FindTranslator(id);
if (translator == NULL) if (translator == NULL)
return B_NO_TRANSLATOR; return B_NO_TRANSLATOR;