Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/17400 )

Change subject: [util] Add a function to fetch non-default flags as a map
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/17400/2/src/kudu/util/flags.cc
File src/kudu/util/flags.cc:

http://gerrit.cloudera.org:8080/#/c/17400/2/src/kudu/util/flags.cc@594
PS2, Line 594: // Instead of "flags_by_name.emplace(flag.name, 
std::move(flag))" using
             :     // following approach as order of evaluation of parameters 
could be different
             :     // leading to unexpected value in "flag.name".
How about using EmplaceOrUpdate() from gutil/map-util.h? Same below.

Under the hood it's insert_or_assign 
https://www.fluentcpp.com/2018/12/11/overview-of-std-map-insertion-emplacement-methods-in-cpp17/



--
To view, visit http://gerrit.cloudera.org:8080/17400
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e7c9fc4de9be05110dba5ca02f48d46b6b474b7
Gerrit-Change-Number: 17400
Gerrit-PatchSet: 2
Gerrit-Owner: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Comment-Date: Wed, 05 May 2021 01:48:59 +0000
Gerrit-HasComments: Yes

Reply via email to