Fix -Wpointer-bool-conversion warning in FunctionView LLVM PR 204944 updated Clang's -Wpointer-bool-conversion and -Wtautological-pointer-compare to look through lvalue references to functions and warn when they are evaluated in a boolean context or compared against null. When passing a function designator/name without '&' to webrtc::FunctionView, template argument deduction infers the type as an lvalue reference to a function. Previously, FunctionView used a single constructor for both function pointers and function references, which checked 'f ? ... : nullptr'. Evaluating a function reference in this ternary check triggered -Wpointer-bool-conversion. This change splits the constructor into two mutually exclusive constructors: 1. One for function pointers (using std::is_pointer), retaining the null check. 2. One for function references (using std::is_function), initializing call_ directly without the null check since function references can never be null. Bug: chromium:531796076 Change-Id: Ibb798adddb47c5a110232e4caf956eba2a0743fe Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/488020 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Zequan Wu <zequanwu@google.com> Reviewed-by: Denise Tell <dct@google.com> Cr-Commit-Position: refs/heads/main@{#48172}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.