refactor: return-braced-init-list pt 2 of 2 (#44890)
* refactor: more return-braced-init-list, this time for v8 and gin objects Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: more return-braced-init-list, this time for v8, gin, std, and base objects Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
90890e20c0
commit
73e791475b
35 changed files with 64 additions and 64 deletions
|
@ -226,7 +226,7 @@ std::vector<blink::MessagePortChannel> MessagePort::DisentanglePorts(
|
|||
const std::vector<gin::Handle<MessagePort>>& ports,
|
||||
bool* threw_exception) {
|
||||
if (ports.empty())
|
||||
return std::vector<blink::MessagePortChannel>();
|
||||
return {};
|
||||
|
||||
std::unordered_set<MessagePort*> visited;
|
||||
|
||||
|
@ -245,7 +245,7 @@ std::vector<blink::MessagePortChannel> MessagePort::DisentanglePorts(
|
|||
gin_helper::ErrorThrower(isolate).ThrowError(
|
||||
"Port at index " + base::NumberToString(i) + " is " + type + ".");
|
||||
*threw_exception = true;
|
||||
return std::vector<blink::MessagePortChannel>();
|
||||
return {};
|
||||
}
|
||||
visited.insert(port);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue