Chromium Code Reviews
DescriptionAllow explicit conversion operators and implement WTF::OwnPtr::operator bool.
For consistency, PassOwnPtr::operator bool is also implemented.
This is the simpler, and as of C++11, more idiomatic, way of only allowing
conversion to bool. A minor downside is that the conversion doesn't
automatically take place on return. There are many workarounds, but the !! idiom
seems most common, so that is what has been used here.
Committed: https://crrev.com/e18d314891dffa45c8583f2ffa4fcf6bbc7e0717
Cr-Commit-Position: refs/heads/master@{#387027}
Patch Set 1 #
Total comments: 7
Patch Set 2 : !! #Patch Set 3 : fix #Messages
Total messages: 21 (6 generated)
|