Descriptionbase: Remove operator& from ScopedVariant and ScopedPropVariant.
The operator& is dangerous as it makes code unclear what is happening.
For ScopedPropVariant there is already a get() method returning a
const& of the internal type. So doing &foo.get() will get a pointer to
the internal type.
For ScopedVariant, there is only operator&, so replace it with an
operator*() that returns a const&. This changes callsites from doing
something like V_FOO(&scoper) to V_FOO(&*scoper) which makes it clear
that it is getting the address of the thing inside scoper, not the
scoper itself.
R=Nico
BUG=464816
Committed: https://crrev.com/8095bc45b602f704ef85df43f9913f48fbf4cf9c
Cr-Commit-Position: refs/heads/master@{#319795}
Patch Set 1 #Patch Set 2 : scoped-operator: rebase #Patch Set 3 : scoped-operator: fixbrowsertest #Patch Set 4 : scoped-operator: ptr() #
Total comments: 2
Patch Set 5 : scoped-operator: prop-ptr #Messages
Total messages: 22 (5 generated)
|