morningman commented on a change in pull request #6268:
URL: https://github.com/apache/incubator-doris/pull/6268#discussion_r677906085



##########
File path: be/src/util/runtime_profile.cpp
##########
@@ -297,15 +297,15 @@ RuntimeProfile* RuntimeProfile::create_child(const 
std::string& name, bool inden
 }
 
 void RuntimeProfile::add_child_unlock(RuntimeProfile* child, bool indent, 
RuntimeProfile* loc) {
-    DCHECK(child != NULL);
+    DCHECK(child != nullptr);
     _child_map[child->_name] = child;
 
-    if (loc == NULL) {
+    if (loc == nullptr) {
         _children.push_back(std::make_pair(child, indent));
     } else {
         for (ChildVector::iterator it = _children.begin(); it != 
_children.end(); ++it) {
             if (it->first == loc) {
-                _children.insert(++it, std::make_pair(child, indent));
+                _children.insert(it++, std::make_pair(child, indent));

Review comment:
       Seems no need to plus? because we return directly.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to