Navigation Menu

Skip to content

Commit

Permalink
doc coding-style: add about void
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 15, 2012
1 parent 274245e commit 53d12f7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions doc/source/developer/coding_style.rst
Expand Up @@ -324,3 +324,33 @@ TODO: ちゃんと考える。
return *this;
}
}
引数
----

voidを省略
^^^^^^^^^^

引数がない場合は ``void`` を省略する。

よい例:

class MyClass
{
unsigned int age_;
unsigned int age()
{
return age_;
};
}

悪い例( ``void`` を省略していない):

class MyClass
{
unsigned int age_;
unsigned int age(void)
{
return age_;
};
}

0 comments on commit 53d12f7

Please sign in to comment.