| Index: webrtc/base/optional.h
|
| diff --git a/webrtc/base/optional.h b/webrtc/base/optional.h
|
| index ec33470f26754a868ce56cef35a189dfc6f8ab69..4d2b44e0cb62ed4d3f6cbf91c8f2649ba73c7a28 100644
|
| --- a/webrtc/base/optional.h
|
| +++ b/webrtc/base/optional.h
|
| @@ -77,6 +77,12 @@ inline T* FunctionThatDoesNothing(T* x) { return x; }
|
| // might make sense, but any larger parse job is probably going to need to
|
| // tell the caller what the problem was, not just that there was one.
|
| //
|
| +// - As a non-mutable function argument. When you want to pass a value of a
|
| +// type T that can fail to be there, const T* is almost always both fastest
|
| +// and cleanest. (If you're *sure* that the the caller will always already
|
| +// have an Optional<T>, const Optional<T>& is slightly faster than const T*,
|
| +// but this is a micro-optimization. In general, stick to const T*.)
|
| +//
|
| // TODO(kwiberg): Get rid of this class when the standard library has
|
| // std::optional (and we're allowed to use it).
|
| template <typename T>
|
|
|