mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00

This reverts commit0f2ce5cc1c
. Reason for revert: Downstream infrastructure should be ready now Original change's description: > Revert "Migrate WebRTC documentation to new renderer" > > This reverts commit3eceaf4669
. > > Reason for revert: > > Original change's description: > > Migrate WebRTC documentation to new renderer > > > > Bug: b/258408932 > > Change-Id: Ib96f39fe0c3912f9746bcc09d079097a145d6115 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290987 > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Commit-Queue: Artem Titov <titovartem@webrtc.org> > > Cr-Commit-Position: refs/heads/main@{#39205} > > Bug: b/258408932 > Change-Id: I16cb4088bee3fc15c2bb88bd692c592b3a7db9fe > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291560 > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> > Owners-Override: Artem Titov <titovartem@webrtc.org> > Commit-Queue: Artem Titov <titovartem@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#39209} Bug: b/258408932 Change-Id: Ia172e4a6ad1cc7953b48eed08776e9d1e44eb074 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291660 Owners-Override: Artem Titov <titovartem@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39231}
1.2 KiB
1.2 KiB
.h
and .cc
files come in pairs
This is an overflow page for this style rule.
Example violations
Example violations, which should be avoided in new code:
- Declarations in
path/to/include/foo.h
, definitions inpath/to/source/foo.cc
. Fix: The.h
and.cc
files should be in the same directory. - Declarations in
foo.h
, definitions in bothfoo_bar.cc
andfoo_baz.cc
. Fix: The.h
and.cc
files should come in pairs, so either splitfoo.h
intofoo_bar.h
andfoo_baz.h
, or mergefoo_bar.cc
andfoo_baz.cc
intofoo.cc
.
Exception for platform-specific code
If the functions in a header file need different implementations for different platforms, we allow the following arrangement:
- Declarations in
foo.h
. - A complete set of matching definitions in
foo_win.cc
, another complete set of matching definitions infoo_mac.cc
, and so on. - As per the main rule, these files should all be in the same
directory and in the same build target. The build target should use
platform conditionals to ensure that exactly one of the
.cc
files are included.