Add modernization section to GEMINI knowledge base

This adds recommendations for Gemini to help it understand the correct
was to update or add new code. This section may be expanded in the
future for other features.

Bug: webrtc:465491622
Change-Id: Ic1c927aedd844e3ab8901ba1733e2d60533989e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/434585
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46515}
This commit is contained in:
Evan Shrubsole 2025-12-16 12:54:42 +00:00 committed by WebRTC LUCI CQ
parent 138c5d0f9b
commit 7e66a9ba10

View File

@ -23,6 +23,16 @@ guide to determine which documents to consult.
WebRTC types and functions live in the `webrtc` namespace. Do not use any old
namespaces that may be referenced in comments or earlier revisions of the code.
#### **Modernization**
* **Use Strong Time Types:** Prefer `webrtc::Timestamp` and `webrtc::TimeDelta`
over raw arithmetic types for time values.
See [issue 42223979](https://issues.webrtc.org/42223979).
* **Avoid AutoThread:** Do not use `AutoThread`. In tests, use `webrtc::test::RunLoop`.
See [issue 469327588](https://issues.webrtc.org/469327588).
* **Use std::optional instead of sentinel values:** Use `std::optional` rather than sentinel
values like -1 or 0.
### **Topic: Modifying BUILD.gn files**
* **For best practices and style in `BUILD.gn` files:**