Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GeoModel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
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
GeoModelDev
GeoModel
Commits
1c0a1ed4
Commit
1c0a1ed4
authored
1 month ago
by
Riccardo Maria Bianchi
Browse files
Options
Downloads
Patches
Plain Diff
Remove apparently unused methods
parent
e7972c96
No related branches found
No related tags found
No related merge requests found
Pipeline
#10247768
skipped
Stage: step-A
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GeoModelIO/GeoModelDBManager/src/GMDBManager.cpp
+18
-15
18 additions, 15 deletions
GeoModelIO/GeoModelDBManager/src/GMDBManager.cpp
with
18 additions
and
15 deletions
GeoModelIO/GeoModelDBManager/src/GMDBManager.cpp
+
18
−
15
View file @
1c0a1ed4
...
...
@@ -2653,19 +2653,22 @@ std::pair<unsigned, unsigned> GMDBManager::getRootPhysVol() {
std
::
string
GMDBManager
::
getDBFilePath
()
{
return
m_dbpath
;
}
// FIXME: TODO: move to an utility class
int
lastIndexOf
(
std
::
vector
<
std
::
string
>
v
,
const
std
::
string
&
str
,
int
pos
=
0
)
{
auto
it
=
std
::
find
(
std
::
next
(
v
.
rbegin
(),
v
.
size
()
-
pos
),
v
.
rend
(),
str
);
if
(
it
!=
v
.
rend
())
{
auto
idx
=
std
::
distance
(
v
.
begin
(),
it
.
base
()
-
1
);
// std::cout << idx << std::endl;
return
idx
;
}
return
-
1
;
// no item matched
}
int
GMDBManager
::
getTableColIndex
(
const
std
::
string
&
tableName
,
const
std
::
string
&
colName
)
{
std
::
vector
<
std
::
string
>
colFields
=
m_tableNames
.
at
(
tableName
);
return
lastIndexOf
(
colFields
,
colName
);
}
// UNUSED
// // FIXME: TODO: move to an utility class
// int lastIndexOf(std::vector<std::string> v, const std::string& str, int pos = 0) {
// auto it = std::find(std::next(v.rbegin(), v.size() - pos), v.rend(), str);
// if (it != v.rend()) {
// auto idx = std::distance(v.begin(), it.base() - 1);
// // std::cout << idx << std::endl;
// return idx;
// }
// return -1; // no item matched
// }
// int GMDBManager::getTableColIndex(const std::string& tableName,
// const std::string& colName) {
// std::vector<std::string> colFields = m_tableNames.at(tableName);
// return lastIndexOf(colFields, colName);
// }
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