Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
28bf100a
Commit
28bf100a
authored
Jan 09, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc/developer: more code style
parent
accbd4e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
developer.xml
doc/developer.xml
+28
-2
No files found.
doc/developer.xml
View file @
28bf100a
...
...
@@ -40,6 +40,12 @@
<listitem>
<para>
comment your code, document your APIs
</para>
</listitem>
<listitem>
<para>
the code should be C++14 compliant, and must compile with
<application>
GCC
</application>
4.9 and
<application>
clang
</application>
3.4
...
...
@@ -48,13 +54,33 @@
<listitem>
<para>
report error conditions with C++ exceptions, preferable
derived from
<varname>
std::runtime_error
</varname>
</para>
</listitem>
<listitem>
<para>
all code must be exception-safe
</para>
</listitem>
<listitem>
<para>
classes and functions names use CamelCase; variables are
lower-case with words separated by underscore
</para>
</listitem>
<listitem>
<para>
Some example code:
</para>
<programlisting
lang=
"C"
>
static inline int
f
oo(const char *abc, int xyz)
F
oo(const char *abc, int xyz)
{
if (abc ==
NULL
) {
if (abc ==
nullptr
) {
LogWarning("Foo happened!");
return -1;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment