Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions design/style_guide/code.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- Table of Contents only links to level 2 headers -->
\[ [Header Guards](#header-guards) \]
\[ [Function Names](#function-names) \]
\[ [Static Functions](#static-functions) \]
\[ [Global Variables](#global-variables) \]
\[ [Memory Ownership](#memory-ownership) \]

Expand Down Expand Up @@ -38,6 +39,12 @@ All C++ code or C code outside src/ should use `#pragma once`
Function names should include the module (ie. path) as a prefix using snake
case.

## Static Functions

Static functions should be declared (forward declared) at the top of a C file,
below includes and file-level variables, and defined below all non-static
(externally visible) functions in the file.

## Global Variables

Global variables should not be shared between files, but for several systems it
Expand Down