Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MostafaMollaali
dynamic
Commits
0cefb3b7
Commit
0cefb3b7
authored
5 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[BL] Remove unused FileFinder::getPath().
parent
67025461
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
BaseLib/FileFinder.cpp
+1
-21
1 addition, 21 deletions
BaseLib/FileFinder.cpp
BaseLib/FileFinder.h
+0
-7
0 additions, 7 deletions
BaseLib/FileFinder.h
with
1 addition
and
28 deletions
BaseLib/FileFinder.cpp
+
1
−
21
View file @
0cefb3b7
...
@@ -52,24 +52,4 @@ void FileFinder::addDirectory(std::string const& dir)
...
@@ -52,24 +52,4 @@ void FileFinder::addDirectory(std::string const& dir)
_directories
.
push_back
(
dir
);
_directories
.
push_back
(
dir
);
}
}
}
}
}
// namespace BaseLib
std
::
string
FileFinder
::
getPath
(
std
::
string
const
&
filename
)
const
{
if
(
_directories
.
empty
())
ERR
(
"FileFinder::getPath(): No directories set."
);
for
(
auto
const
&
dir
:
_directories
)
{
std
::
string
testDir
(
dir
);
std
::
ifstream
is
(
testDir
.
append
(
filename
).
c_str
());
if
(
is
.
good
())
{
is
.
close
();
return
testDir
;
}
}
ERR
(
"FileFinder::getPath(): File not found."
);
return
filename
;
}
}
// end namespace BaseLib
This diff is collapsed.
Click to expand it.
BaseLib/FileFinder.h
+
0
−
7
View file @
0cefb3b7
...
@@ -45,13 +45,6 @@ public:
...
@@ -45,13 +45,6 @@ public:
*/
*/
void
addDirectory
(
std
::
string
const
&
dir
);
void
addDirectory
(
std
::
string
const
&
dir
);
/**
* Given a filename, this method will return the complete path where this file can be found.
* If the file is located in more than one of the directories in the search list, only the
* first location will be returned.
*/
std
::
string
getPath
(
std
::
string
const
&
filename
)
const
;
private:
private:
std
::
vector
<
std
::
string
>
_directories
;
std
::
vector
<
std
::
string
>
_directories
;
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment