Skip to content

Commit a298592

Browse files
committed
review changes nr. 2 - changed 'index_info' from tuple to simple struct
1 parent 15f599e commit a298592

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

indexing_utilities.cpp

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,23 @@ namespace irods {
299299

300300
};
301301

302-
class index_info final : public std::tuple<std::string,std::string,std::string> {
302+
struct index_info
303+
{
303304
public:
304-
using string = std::string;
305-
using tuple::tuple;
306-
string& index_name() { return std::get<0>(*this); }
307-
string& index_type() { return std::get<1>(*this); }
308-
string& index_tech() { return std::get<2>(*this); }
305+
index_info ( const std::string & index_name_
306+
,const std::string & index_type_
307+
,const std::string & index_tech_ )
308+
: index_name {index_name_}
309+
,index_type {index_type_}
310+
,index_tech {index_tech_}
311+
{
312+
}
313+
bool operator< (const index_info & other) const { return index_name < other.index_name ||
314+
index_type < other.index_type ||
315+
index_tech < other.index_tech; }
316+
std::string index_name;
317+
std::string index_type;
318+
std::string index_tech;
309319
};
310320

311321
// - Starting at _collection_name , recurse over every sub-element of the tree
@@ -441,16 +451,14 @@ namespace irods {
441451
//if (_index_type == "metadata" ) {
442452
auto info_set = idx_info_cache.accum( path.string() );
443453
for (auto info: info_set) {
444-
irods::log( LOG_NOTICE, fmt::format("DWM - reindexing for perms - name/type/tech=[{}][{}][{}]",
445-
info.index_name(), info.index_type(), info.index_tech()) );
446454
schedule_policy_event_for_object(
447455
policy_name,
448456
path.string(),
449457
_user_name,
450458
EMPTY_RESOURCE_NAME,
451-
info.index_tech(),
452-
info.index_name(),
453-
info.index_type(),
459+
info.index_tech,
460+
info.index_name,
461+
info.index_type,
454462
generate_delay_execution_parameters(),
455463
{},{},{},
456464
{{ "job_category_tag", unique_key }} );

0 commit comments

Comments
 (0)