diff --git a/src/build/libbe/storage/Path.cpp b/src/build/libbe/storage/Path.cpp index a26deaa33f..27941e3dd3 100644 --- a/src/build/libbe/storage/Path.cpp +++ b/src/build/libbe/storage/Path.cpp @@ -9,16 +9,16 @@ * Ingo Weinhold, ingo_weinhold@gmx.de */ - /*! \file Path.cpp BPath implementation. */ +#include + #include -#include #include #include #include @@ -30,10 +30,6 @@ using namespace std; -#ifdef USE_OPENBEOS_NAMESPACE -using namespace OpenBeOS; -#endif - //! Creates an uninitialized BPath object. BPath::BPath() @@ -424,8 +420,8 @@ BPath::operator==(const BPath &item) const bool BPath::operator==(const char *path) const { - return ((InitCheck() != B_OK && (path == NULL)) - || ((fName && path) && strcmp(fName, path)) == 0); + return (InitCheck() != B_OK && path == NULL) + || (fName != NULL && path != NULL && !strcmp(fName, path)); } diff --git a/src/build/libbe/storage/ResourcesContainer.cpp b/src/build/libbe/storage/ResourcesContainer.cpp index c2e2b74479..742afcda74 100644 --- a/src/build/libbe/storage/ResourcesContainer.cpp +++ b/src/build/libbe/storage/ResourcesContainer.cpp @@ -8,16 +8,16 @@ * Ingo Weinhold, ingo_weinhold@gmx.de */ - /*! \file ResourcesContainer.cpp ResourcesContainer implementation. */ +#include "ResourcesContainer.h" + #include -#include "ResourcesContainer.h" #include "ResourceItem.h" @@ -151,9 +151,9 @@ ResourcesContainer::IndexOf(type_code type, const char *name) const ResourceItem *item = ResourceAt(i); const char *itemName = item->Name(); if (item->Type() == type - && (((name == NULL && itemName == NULL) - || (name != NULL && itemName != NULL)) - && !strcmp(name, itemName))) { + && ((name == NULL && itemName == NULL) + || (name != NULL && itemName != NULL + && !strcmp(name, itemName)))) { index = i; } } @@ -216,5 +216,5 @@ ResourcesContainer::IsModified() const } -}; // namespace Storage -}; // namespace BPrivate +} // namespace Storage +} // namespace BPrivate