未验证 提交 f398204b 编写于 作者: S stuartmorgan 提交者: GitHub

Add a style note about Linux embedding style (#21819)

上级 b715d3f2
......@@ -20,11 +20,18 @@ contributing guide.
The Flutter engine follows Google style for the languages it uses:
- [C++](https://google.github.io/styleguide/cppguide.html)
- **Note**: The Linux embedding generally follows idiomatic GObject-based C style.
Use of C++ is discouraged in that embedding to avoid creating hybrid code that
feels unfamiliar to either developers used to working with GObject or C++ developers.
E.g., do not use STL collections or std::string. Exceptions:
- C-style casts are forbidden; use C++ casts.
- Use `nullptr` rather than `NULL`.
- Avoid `#define`; for internal constants use `static constexpr` instead.
- [Objective-C](https://google.github.io/styleguide/objcguide.html) (including
[Objective-C++](https://google.github.io/styleguide/objcguide.html#objective-c))
- [Java](https://google.github.io/styleguide/javaguide.html)
C++ and Objective-C/C++ files are formatted with `clang-format`, and GN files with `gn format`.
C/C++ and Objective-C/C++ files are formatted with `clang-format`, and GN files with `gn format`.
[build_status]: https://cirrus-ci.com/github/flutter/engine
[code_of_conduct]: https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册