Skip to content
Snippets Groups Projects
Commit 1c0a1ed4 authored by Riccardo Maria Bianchi's avatar Riccardo Maria Bianchi :sunny:
Browse files

Remove apparently unused methods

parent e7972c96
No related branches found
No related tags found
No related merge requests found
Pipeline #10247768 skipped
......@@ -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);
// }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment