mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
Standardize RST header syntax
This commit is contained in:
@@ -46,7 +46,7 @@ use of modern C++ features conservative. Their use needs to serve a real
|
||||
purpose, such as improving code readability or performance.
|
||||
|
||||
Standard Template Library
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
We don't allow using the `STL <https://en.wikipedia.org/wiki/Standard_Template_Library>`__
|
||||
as Godot provides its own data types (among other things).
|
||||
@@ -67,7 +67,7 @@ This means that pull requests should **not** use ``std::string``,
|
||||
and Array. Therefore, List should be avoided in new code unless necessary.
|
||||
|
||||
``auto`` keyword
|
||||
^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Please don't use the ``auto`` keyword for type inference. While it can avoid
|
||||
repetition, it can also lead to confusing code:
|
||||
@@ -88,14 +88,14 @@ We chose to forbid ``auto`` instead of allowing it on a case-by-case basis to
|
||||
avoid having to decide on difficult edge cases. Thank you for your understanding.
|
||||
|
||||
Lambdas
|
||||
^^^^^^^
|
||||
~~~~~~~
|
||||
|
||||
Lambdas should be used conservatively when they make code effectively faster or
|
||||
simpler, and do not impede readability. Please ask before using lambdas in a
|
||||
pull request.
|
||||
|
||||
``#pragma once`` directive
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To follow the existing style, please use standard ``#ifdef``-based include
|
||||
guards instead of ``#pragma once`` in new files.
|
||||
|
||||
Reference in New Issue
Block a user