You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CODING_STYLE.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -110,9 +110,9 @@ Use `solAssert` and `solUnimplementedAssert` generously to check assumptions tha
110
110
4. Favour declarations close to use; do not habitually declare at top of scope ala C.
111
111
5. Pass non-trivial parameters as const reference, unless the data is to be copied into the function, then either pass by const reference or by value and use std::move.
112
112
6. If a function returns multiple values, use std::tuple (std::pair acceptable) or better introduce a struct type. Do not use */& arguments.
113
-
7. Use parameters of pointer type only if ``nullptr`` is a valid argument, use references otherwise. Often, ``std::optional`` is better suited than a raw pointer.
113
+
7. Use parameters of pointer type only if `nullptr` is a valid argument, use references otherwise. Often, `std::optional` is better suited than a raw pointer.
114
114
8. Never use a macro where adequate non-preprocessor C++ can be written.
115
-
9. Only use ``auto`` if the type is very long and rather irrelevant.
115
+
9. Only use `auto` if the type is very long and rather irrelevant.
116
116
10. Do not pass bools: prefer enumerations instead.
117
117
11. Prefer enum class to straight enum.
118
118
12. Always initialize POD variables, even if their value is overwritten later.
0 commit comments