* Fixed broken comparisons introduced with r25702.

* Removed old OpenBeOS namespace leftover.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25703 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-05-29 14:27:57 +00:00
parent a9a5a1054b
commit 2620242fd5
2 changed files with 11 additions and 15 deletions
+4 -8
View File
@@ -9,16 +9,16 @@
* Ingo Weinhold, [email protected]
*/
/*!
\file Path.cpp
BPath implementation.
*/
#include <Path.h>
#include <new>
#include <Path.h>
#include <Directory.h>
#include <Entry.h>
#include <StorageDefs.h>
@@ -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));
}
@@ -8,16 +8,16 @@
* Ingo Weinhold, [email protected]
*/
/*!
\file ResourcesContainer.cpp
ResourcesContainer implementation.
*/
#include "ResourcesContainer.h"
#include <stdio.h>
#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