mirror of
				https://github.com/MaskRay/ccls.git
				synced 2025-11-03 22:04:24 +00:00 
			
		
		
		
	threaded_queue.hh: fix -Wpessimizing-move (#409)
This commit is contained in:
		
							parent
							
								
									d55fd001bc
								
							
						
					
					
						commit
						2d11cc25c1
					
				@ -135,7 +135,7 @@ public:
 | 
				
			|||||||
      auto val = std::move(q->front());
 | 
					      auto val = std::move(q->front());
 | 
				
			||||||
      q->pop_front();
 | 
					      q->pop_front();
 | 
				
			||||||
      --total_count_;
 | 
					      --total_count_;
 | 
				
			||||||
      return std::move(val);
 | 
					      return val;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    if (!priority_.empty())
 | 
					    if (!priority_.empty())
 | 
				
			||||||
      return execute(&priority_);
 | 
					      return execute(&priority_);
 | 
				
			||||||
@ -150,7 +150,7 @@ public:
 | 
				
			|||||||
      auto val = std::move(q->front());
 | 
					      auto val = std::move(q->front());
 | 
				
			||||||
      q->pop_front();
 | 
					      q->pop_front();
 | 
				
			||||||
      --total_count_;
 | 
					      --total_count_;
 | 
				
			||||||
      return std::move(val);
 | 
					      return val;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    if (priority_.size())
 | 
					    if (priority_.size())
 | 
				
			||||||
      return execute(&priority_);
 | 
					      return execute(&priority_);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user