mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 17:40:49 +00:00
gdb: remove unnecessary call to std::string constructor
I spotted this explicit call to std::string, which creates an unnecessary temporary extra std::string, while calling emplace_back. I'm not sure if it has any impact in an optimized build, maybe the compiler elides it. But still, it's unnecessary. Change-Id: I873337ea91db29ac06267aff8fc12dcf52824cac Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
@@ -155,7 +155,7 @@ cmd_list_element::command_components () const
|
||||
if (this->prefix != nullptr)
|
||||
result = this->prefix->command_components ();
|
||||
|
||||
result.emplace_back (std::string (this->name));
|
||||
result.emplace_back (this->name);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user