Modernize deprecated headers in api/, pc/ and rtc_base/

Done using
  tools/clang/scripts/build_clang_tools_extra.py \
    --fetch out/Default clang-tidy clang-apply-replacements
  ninja -C out/Default
  gn gen out/Default --export-compile-commands
  cd out/Default
  tools/clang/third_party/llvm/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -p . \
    -clang-tidy-binary out/Default/tools/clang/third_party/llvm/build/bin/clang-tidy \
    -clang-apply-replacements-binary \
        out/Default/tools/clang/third_party/llvm/build/bin/clang-apply-replacements \
    -checks='-*,modernize-deprecated-headers' \
    -fix api/ pc/ rtc_base/
followed by
  git cl format
and a round of IWYU followed by more git cl format

Bug: webrtc:424706384
Change-Id: I8add6fe713fba9d6ef4cc3783bdb7e7f975aaa0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/400921
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45182}
This commit is contained in:
Philipp Hancke 2025-07-18 10:47:39 -07:00 committed by WebRTC LUCI CQ
parent 0cc735cd08
commit b2ea936d33
153 changed files with 206 additions and 330 deletions

View File

@ -10,10 +10,9 @@
#include "api/array_view.h"
#include <stdint.h>
#include <array>
#include <cstddef>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>

View File

@ -10,9 +10,8 @@
#include "api/audio/audio_frame.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include <optional>
#include "api/array_view.h"

View File

@ -10,8 +10,7 @@
#include "api/audio/channel_layout.h"
#include <stddef.h>
#include <cstddef>
#include <iterator>
#include "rtc_base/checks.h"

View File

@ -10,8 +10,8 @@
#include "api/audio/audio_frame.h"
#include <stdint.h>
#include <string.h> // memcmp
#include <cstdint>
#include <cstring>
#include "api/audio/audio_view.h"
#include "api/audio/channel_layout.h"

View File

@ -10,8 +10,7 @@
#include "api/audio_codecs/L16/audio_encoder_L16.h"
#include <stddef.h>
#include <cstddef>
#include <map>
#include <memory>
#include <optional>

View File

@ -10,8 +10,7 @@
#include "api/audio_codecs/g711/audio_encoder_g711.h"
#include <stddef.h>
#include <cstddef>
#include <initializer_list>
#include <map>
#include <memory>

View File

@ -10,8 +10,7 @@
#include "api/audio_codecs/g722/audio_encoder_g722.h"
#include <stddef.h>
#include <cstddef>
#include <map>
#include <memory>
#include <optional>

View File

@ -10,9 +10,8 @@
#include "api/legacy_stats_types.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include <string>
#include <utility>

View File

@ -10,8 +10,7 @@
#include "api/numerics/samples_stats_counter.h"
#include <math.h>
#include <cmath>
#include <random>
#include <vector>

View File

@ -13,6 +13,7 @@
#include <stdio.h>
#include <cstddef>
#include <cstdio>
#include <fstream>
#include <ios>
#include <iterator>

View File

@ -10,9 +10,8 @@
#include "api/rtp_packet_info.h"
#include <stddef.h>
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <utility>
#include <vector>

View File

@ -10,7 +10,7 @@
#include "api/rtp_packet_infos.h"
#include <stddef.h>
#include <cstddef>
#include "api/rtp_headers.h"
#include "api/rtp_packet_info.h"

View File

@ -9,8 +9,7 @@
*/
#include "api/test/metrics/chrome_perf_dashboard_metrics_exporter.h"
#include <stdio.h>
#include <cstdio>
#include <memory>
#include <string>
#include <vector>

View File

@ -9,8 +9,7 @@
*/
#include "api/test/metrics/metrics_set_proto_file_exporter.h"
#include <stdio.h>
#include <cstdio>
#include <map>
#include <string>
#include <utility>

View File

@ -9,10 +9,9 @@
*/
#include "api/test/metrics/stdout_metrics_exporter.h"
#include <stdio.h>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <optional>
#include <string>

View File

@ -10,9 +10,8 @@
#include "api/video/encoded_image.h"
#include <stdlib.h>
#include <cstdint>
#include <cstdlib>
#include <optional>
#include <utility>

View File

@ -9,10 +9,9 @@
*/
#include "api/video/i410_buffer.h"
#include <string.h>
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <utility>
#include "api/make_ref_counted.h"

View File

@ -9,10 +9,9 @@
*/
#include "api/video/i420_buffer.h"
#include <string.h>
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <utility>
#include "api/make_ref_counted.h"

View File

@ -9,10 +9,9 @@
*/
#include "api/video/i422_buffer.h"
#include <string.h>
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <utility>
#include "api/make_ref_counted.h"

View File

@ -9,10 +9,9 @@
*/
#include "api/video/i444_buffer.h"
#include <string.h>
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <utility>
#include "api/make_ref_counted.h"

View File

@ -10,7 +10,7 @@
#include "api/video/color_space.h"
#include <stdint.h>
#include <cstdint>
#include "test/gtest.h"

View File

@ -10,8 +10,7 @@
#include "api/video_codecs/video_decoder_software_fallback_wrapper.h"
#include <stdint.h>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>

View File

@ -10,9 +10,8 @@
#include "api/video_codecs/video_encoder_software_fallback_wrapper.h"
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>

View File

@ -10,8 +10,7 @@
#include "api/video_codecs/video_codec.h"
#include <string.h>
#include <cstring>
#include <string>
#include "absl/strings/match.h"

View File

@ -10,9 +10,8 @@
#include "api/video_codecs/video_decoder_software_fallback_wrapper.h"
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>

View File

@ -10,10 +10,9 @@
#include "api/video_codecs/video_encoder.h"
#include <string.h>
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <optional>
#include <string>
#include <tuple>

View File

@ -10,8 +10,7 @@
#include "api/video_codecs/video_encoder_software_fallback_wrapper.h"
#include <stdint.h>
#include <cstdint>
#include <cstdio>
#include <memory>
#include <numeric>

View File

@ -10,8 +10,7 @@
#include "pc/audio_rtp_receiver.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>

View File

@ -10,8 +10,7 @@
#include "pc/channel.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>

View File

@ -9,9 +9,8 @@
*/
#include "pc/codec_vendor.h"
#include <stddef.h>
#include <algorithm>
#include <cstddef>
#include <map>
#include <optional>
#include <string>

View File

@ -10,8 +10,7 @@
#include "pc/codec_vendor.h"
#include <stddef.h>
#include <cstddef>
#include <string>
#include <vector>

View File

@ -8,9 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdint.h>
#include <atomic>
#include <cstdint>
#include <cstdlib>
#include <iterator>
#include <memory>

View File

@ -8,9 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdint.h>
#include <string.h>
#include <cstdint>
#include <cstring>
#include <memory>
#include <optional>
#include <string>

View File

@ -10,9 +10,8 @@
#include "pc/dtls_srtp_transport.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include <memory>
#include <vector>

View File

@ -10,10 +10,9 @@
#include "pc/dtmf_sender.h"
#include <ctype.h>
#include <string.h>
#include <cctype>
#include <cstdint>
#include <cstring>
#include <string>
#include "api/dtmf_sender_interface.h"

View File

@ -10,8 +10,7 @@
#include "pc/dtmf_sender.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>

View File

@ -10,10 +10,9 @@
#include "pc/external_hmac.h"
#include <stdlib.h> // For malloc/free.
#include <string.h>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include "rtc_base/logging.h"
#include "rtc_base/zero_memory.h"

View File

@ -10,9 +10,8 @@
#include "pc/ice_server_parsing.h"
#include <stddef.h>
#include <cctype> // For std::isdigit.
#include <cctype>
#include <cstddef>
#include <optional>
#include <string>
#include <tuple>

View File

@ -10,9 +10,8 @@
#include "api/jsep_session_description.h"
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>

View File

@ -10,9 +10,8 @@
#include "pc/jsep_transport.h"
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
@ -34,6 +33,7 @@
#include "p2p/base/p2p_constants.h"
#include "p2p/base/p2p_transport_channel.h"
#include "p2p/base/transport_description.h"
#include "p2p/dtls/dtls_transport_internal.h"
#include "pc/dtls_srtp_transport.h"
#include "pc/dtls_transport.h"
#include "pc/rtp_transport.h"

View File

@ -10,8 +10,7 @@
#include "pc/jsep_transport_controller.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <map>

View File

@ -10,9 +10,8 @@
#include "pc/jsep_transport.h"
#include <stdint.h>
#include <string.h>
#include <cstdint>
#include <cstring>
#include <memory>
#include <optional>
#include <ostream>

View File

@ -10,11 +10,10 @@
#include "pc/legacy_stats_collector.h"
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <map>
#include <memory>
#include <optional>

View File

@ -10,9 +10,8 @@
#include "pc/legacy_stats_collector.h"
#include <stdio.h>
#include <cstdint>
#include <cstdio>
#include <memory>
#include <optional>
#include <string>

View File

@ -10,11 +10,12 @@
#include "pc/media_protocol_names.h"
#include <ctype.h>
#include <stddef.h>
#include <cctype>
#include <cstddef>
#include <string>
#include "absl/strings/string_view.h"
namespace webrtc {
// The official registry of RTP parameters is at

View File

@ -10,9 +10,8 @@
#include "pc/media_session.h"
#include <stddef.h>
#include <algorithm>
#include <cstddef>
#include <memory>
#include <optional>
#include <string>

View File

@ -10,8 +10,7 @@
#include "pc/media_session.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <map>
#include <memory>

View File

@ -10,8 +10,7 @@
#include "pc/media_stream.h"
#include <stddef.h>
#include <cstddef>
#include <string>
#include <utility>

View File

@ -10,7 +10,7 @@
#include "pc/media_stream.h"
#include <stddef.h>
#include <cstddef>
#include "api/media_stream_interface.h"
#include "api/scoped_refptr.h"

View File

@ -10,9 +10,8 @@
#include "pc/peer_connection.h"
#include <limits.h>
#include <stddef.h>
#include <climits>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <map>

View File

@ -8,8 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdint.h>
#include <memory>
#include <optional>

View File

@ -8,8 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stddef.h>
#include <cstddef>
#include <memory>
#include <ostream>
#include <string>

View File

@ -8,8 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stddef.h>
#include <cstddef>
#include <memory>
#include <ostream>
#include <string>

View File

@ -8,9 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <memory>
#include <optional>

View File

@ -8,9 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>

View File

@ -15,10 +15,9 @@
// do NOT add it here, but instead add it to the file
// slow_peer_connection_integrationtest.cc
#include <stdint.h>
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>

View File

@ -10,10 +10,9 @@
#include "api/peer_connection_interface.h"
#include <limits.h>
#include <stdint.h>
#include <climits>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>

View File

@ -8,9 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stddef.h>
#include <algorithm>
#include <cstddef>
#include <map>
#include <memory>
#include <optional>

View File

@ -8,8 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>

View File

@ -14,8 +14,6 @@
// The error messages when the tests fail are intended to contain C++ code
// that can be pasted into the test when updating it.
#include <stdint.h>
#include <algorithm>
#include <memory>
#include <string>

View File

@ -11,8 +11,6 @@
// Integration tests for PeerConnection.
// These tests exercise a full stack for the SVC extension.
#include <stdint.h>
#include <algorithm>
#include <vector>

View File

@ -10,8 +10,6 @@
#include "pc/peer_connection_wrapper.h"
#include <stdint.h>
#include <memory>
#include <optional>
#include <string>

View File

@ -10,8 +10,7 @@
#include "pc/remote_audio_source.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>

View File

@ -10,9 +10,8 @@
#include "pc/rtc_stats_collector.h"
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <initializer_list>
#include <map>
#include <memory>

View File

@ -8,8 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdint.h>
#include <cstdint>
#include <memory>
#include <optional>
#include <set>

View File

@ -10,9 +10,8 @@
#include "pc/rtp_receiver.h"
#include <stddef.h>
#include <atomic>
#include <cstddef>
#include <string>
#include <utility>
#include <vector>

View File

@ -8,8 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <memory>

View File

@ -10,9 +10,8 @@
#include "pc/rtp_transceiver.h"
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <iterator>
#include <memory>

View File

@ -10,8 +10,7 @@
#include "pc/rtp_transport.h"
#include <errno.h>
#include <cerrno>
#include <cstdint>
#include <optional>
#include <string>

View File

@ -10,8 +10,7 @@
#include "pc/sctp_utils.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>

View File

@ -10,8 +10,7 @@
#include "pc/sctp_utils.h"
#include <stdint.h>
#include <cstdint>
#include <limits>
#include <optional>
#include <string>

View File

@ -10,8 +10,7 @@
#include "pc/simulcast_sdp_serializer.h"
#include <stddef.h>
#include <cstddef>
#include <map>
#include <string>
#include <vector>

View File

@ -11,8 +11,7 @@
// This file is intended for PeerConnection integration tests that are
// slow to execute (currently defined as more than 5 seconds per test).
#include <stdint.h>
#include <cstdint>
#include <memory>
#include <string>
#include <tuple>

View File

@ -10,8 +10,6 @@
#include "pc/srtp_session.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include <iomanip>

View File

@ -10,8 +10,6 @@
#include "pc/srtp_session.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include <limits>

View File

@ -10,9 +10,8 @@
#include "pc/srtp_transport.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include <memory>
#include <vector>

View File

@ -10,9 +10,8 @@
#include "pc/test/fake_audio_capture_module.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include "api/audio/audio_device_defines.h"
#include "api/make_ref_counted.h"

View File

@ -10,10 +10,9 @@
#include "pc/test/fake_audio_capture_module.h"
#include <string.h>
#include <algorithm>
#include <cstdint>
#include <cstring>
#include "api/audio/audio_device_defines.h"
#include "api/scoped_refptr.h"

View File

@ -10,8 +10,7 @@
#include "pc/test/peer_connection_test_wrapper.h"
#include <stddef.h>
#include <cstddef>
#include <memory>
#include <optional>
#include <string>

View File

@ -10,8 +10,7 @@
#include "pc/track_media_info_map.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <initializer_list>
#include <optional>

View File

@ -10,8 +10,7 @@
#include "pc/typed_codec_vendor.h"
#include <stddef.h>
#include <cstddef>
#include <functional>
#include <map>
#include <vector>

View File

@ -10,8 +10,7 @@
#include "pc/video_rtp_receiver.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>

View File

@ -10,9 +10,8 @@
#include "pc/video_rtp_track_source.h"
#include <stddef.h>
#include <algorithm>
#include <cstddef>
#include "api/sequence_checker.h"
#include "api/video/recordable_encoded_frame.h"

View File

@ -10,10 +10,9 @@
#include "pc/webrtc_sdp.h"
#include <ctype.h>
#include <limits.h>
#include <algorithm>
#include <cctype>
#include <climits>
#include <cstddef>
#include <cstdint>
#include <map>

View File

@ -8,10 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdio.h>
#include <string.h>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <map>
#include <memory>
#include <optional>

View File

@ -10,8 +10,7 @@
#include "pc/webrtc_session_description_factory.h"
#include <stddef.h>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>

View File

@ -10,12 +10,10 @@
#include "rtc_base/async_tcp_socket.h"
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <memory>
#include <utility>
@ -29,10 +27,10 @@
#include "rtc_base/network/sent_packet.h"
#include "rtc_base/socket.h"
#include "rtc_base/socket_address.h"
#include "rtc_base/time_utils.h" // for TimeMillis
#include "rtc_base/time_utils.h"
#if defined(WEBRTC_POSIX)
#include <errno.h>
#include <cerrno>
#endif // WEBRTC_POSIX
namespace webrtc {

View File

@ -10,9 +10,8 @@
#include "rtc_base/bitstream_reader.h"
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <string>
#include "absl/numeric/bits.h"

View File

@ -10,10 +10,9 @@
#include "rtc_base/bitstream_reader.h"
#include <stddef.h>
#include <stdint.h>
#include <array>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <optional>
#include <utility>

View File

@ -14,9 +14,9 @@
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/pool.h>
#include <stdint.h>
#include <string.h>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <memory>
#include <string>

View File

@ -10,10 +10,9 @@
#include "rtc_base/buffer_queue.h"
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <cstdint>
#include <cstring>
#include "api/sequence_checker.h"
#include "rtc_base/buffer.h"

View File

@ -10,7 +10,7 @@
#include "rtc_base/buffer_queue.h"
#include <string.h>
#include <cstring>
#include "test/gtest.h"

View File

@ -10,9 +10,8 @@
#include "rtc_base/byte_buffer.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include <string>
#include "absl/strings/string_view.h"

View File

@ -10,9 +10,8 @@
#include "rtc_base/byte_buffer.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include <string>
#include <utility>

View File

@ -12,6 +12,8 @@
#include <stdint.h>
#include <cstdint>
#include "test/gtest.h"
namespace webrtc {

View File

@ -12,7 +12,6 @@
// src/base/logging.cc.
#include <stdlib.h>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
@ -34,7 +33,7 @@
#elif defined(__native_client__) && __native_client__
#define LAST_SYSTEM_ERROR (0)
#elif defined(WEBRTC_POSIX)
#include <errno.h>
#include <cerrno>
#define LAST_SYSTEM_ERROR (errno)
#endif // WEBRTC_WIN

View File

@ -10,9 +10,8 @@
#include "rtc_base/copy_on_write_buffer.h"
#include <stddef.h>
#include <algorithm>
#include <cstddef>
#include <cstring>
#include <utility>

View File

@ -23,10 +23,11 @@
#include <zircon/syscalls.h>
#elif defined(WEBRTC_LINUX)
#include <features.h>
#include <stdlib.h>
#include <string.h> // IWYU pragma: keep
#include <unistd.h>
#include <cstdlib>
#include <cstring> // IWYU pragma: keep
#ifdef __GLIBC_PREREQ
#define WEBRTC_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
#else

View File

@ -10,13 +10,15 @@
#include "rtc_base/cpu_time.h"
#include <time.h>
#include <cstdint>
#include "rtc_base/logging.h"
#include "rtc_base/time_utils.h"
#if defined(WEBRTC_LINUX)
#include <time.h>
#include <ctime>
#elif defined(WEBRTC_MAC)
#include <mach/mach_init.h>
#include <mach/mach_port.h>

View File

@ -10,8 +10,6 @@
#include "rtc_base/crypto_random.h"
#include <string.h>
#include <cstdint>
#include <cstring>
#include <memory>

Some files were not shown because too many files have changed in this diff Show More