null+****@clear*****
null+****@clear*****
2012年 3月 15日 (木) 17:16:57 JST
Kouhei Sutou 2012-03-15 17:16:57 +0900 (Thu, 15 Mar 2012)
New Revision: 53d12f713b470bf34d07ba723361f82466242eda
Log:
doc coding-style: add about void
Modified files:
doc/source/developer/coding_style.rst
Modified: doc/source/developer/coding_style.rst (+30 -0)
===================================================================
--- doc/source/developer/coding_style.rst 2012-03-15 17:13:48 +0900 (d67657f)
+++ doc/source/developer/coding_style.rst 2012-03-15 17:16:57 +0900 (49888ff)
@@ -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_;
+ };
+ }