BPathFinder: Coding style improvements

This commit is contained in:
Ingo Weinhold
2013-11-19 02:05:36 +01:00
parent 81522ad41b
commit 0eb197d40c
2 changed files with 34 additions and 34 deletions
+9 -9
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2013, Haiku Inc. All Rights Reserved.
* Copyright 2013, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PATH_FINDER_H
@@ -34,26 +34,26 @@ public:
status_t FindPath(const char* architecture,
path_base_directory baseDirectory,
const char* subPath, uint32 flags,
BPath& path);
BPath& _path);
status_t FindPath(path_base_directory baseDirectory,
const char* subPath, uint32 flags,
BPath& path);
BPath& _path);
status_t FindPath(path_base_directory baseDirectory,
const char* subPath, BPath& path);
const char* subPath, BPath& _path);
status_t FindPath(path_base_directory baseDirectory,
BPath& path);
BPath& _path);
static status_t FindPaths(const char* architecture,
path_base_directory baseDirectory,
const char* subPath, uint32 flags,
BStringList& paths);
BStringList& _paths);
static status_t FindPaths(path_base_directory baseDirectory,
const char* subPath, uint32 flags,
BStringList& paths);
BStringList& _paths);
static status_t FindPaths(path_base_directory baseDirectory,
const char* subPath, BStringList& paths);
const char* subPath, BStringList& _paths);
static status_t FindPaths(path_base_directory baseDirectory,
BStringList& paths);
BStringList& _paths);
private:
status_t _SetTo(const void* codePointer,
+25 -25
View File
@@ -55,13 +55,12 @@ BPathFinder::SetTo(const entry_ref& ref, const char* dependency)
}
status_t
BPathFinder::FindPath(const char* architecture,
path_base_directory baseDirectory, const char* subPath, uint32 flags,
BPath& path)
BPath& _path)
{
path.Unset();
_path.Unset();
if (fInitStatus != B_OK)
return fInitStatus;
@@ -83,38 +82,39 @@ BPathFinder::FindPath(const char* architecture,
if (error != B_OK)
return error;
return path.SetTo(pathBuffer);
}
status_t
BPathFinder::FindPath(path_base_directory baseDirectory, const char* subPath,
uint32 flags, BPath& path)
{
return FindPath(NULL, baseDirectory, subPath, flags, path);
return _path.SetTo(pathBuffer);
}
status_t
BPathFinder::FindPath(path_base_directory baseDirectory, const char* subPath,
BPath& path)
uint32 flags, BPath& _path)
{
return FindPath(NULL, baseDirectory, subPath, 0, path);
return FindPath(NULL, baseDirectory, subPath, flags, _path);
}
status_t
BPathFinder::FindPath(path_base_directory baseDirectory, BPath& path)
BPathFinder::FindPath(path_base_directory baseDirectory, const char* subPath,
BPath& _path)
{
return FindPath(NULL, baseDirectory, NULL, 0, path);
return FindPath(NULL, baseDirectory, subPath, 0, _path);
}
status_t
BPathFinder::FindPath(path_base_directory baseDirectory, BPath& _path)
{
return FindPath(NULL, baseDirectory, NULL, 0, _path);
}
/*static*/ status_t
BPathFinder::FindPaths(const char* architecture,
path_base_directory baseDirectory, const char* subPath, uint32 flags,
BStringList& paths)
BStringList& _paths)
{
paths.MakeEmpty();
_paths.MakeEmpty();
// get the paths
char** pathArray;
@@ -127,8 +127,8 @@ BPathFinder::FindPaths(const char* architecture,
// add them to BStringList
for (size_t i = 0; i < pathCount; i++) {
BString path(pathArray[i]);
if (path.IsEmpty() || !paths.Add(path)) {
paths.MakeEmpty();
if (path.IsEmpty() || !_paths.Add(path)) {
_paths.MakeEmpty();
return B_NO_MEMORY;
}
}
@@ -139,24 +139,24 @@ BPathFinder::FindPaths(const char* architecture,
/*static*/ status_t
BPathFinder::FindPaths(path_base_directory baseDirectory, const char* subPath,
uint32 flags, BStringList& paths)
uint32 flags, BStringList& _paths)
{
return FindPaths(NULL, baseDirectory, subPath, 0, paths);
return FindPaths(NULL, baseDirectory, subPath, 0, _paths);
}
/*static*/ status_t
BPathFinder::FindPaths(path_base_directory baseDirectory, const char* subPath,
BStringList& paths)
BStringList& _paths)
{
return FindPaths(NULL, baseDirectory, subPath, 0, paths);
return FindPaths(NULL, baseDirectory, subPath, 0, _paths);
}
/*static*/ status_t
BPathFinder::FindPaths(path_base_directory baseDirectory, BStringList& paths)
BPathFinder::FindPaths(path_base_directory baseDirectory, BStringList& _paths)
{
return FindPaths(NULL, baseDirectory, NULL, 0, paths);
return FindPaths(NULL, baseDirectory, NULL, 0, _paths);
}