浏览代码

- use markdown for coding convention
- rewrite it

Andy Maloney 10 年之前
父节点
当前提交
baddcc2f34
共有 2 个文件被更改,包括 31 次插入14 次删除
  1. 31 0
      CodeConventions.md
  2. 0 14
      CodeConventions.txt

+ 31 - 0
CodeConventions.md

@@ -0,0 +1,31 @@
+
+Open Asset Import Library Coding Conventions
+==
+
+If you want to participate as a developer in the **Open Asset Import Library** please read and respect the following coding conventions. This will ensure consistency throughout the codebase and help all the Open Asset Import Library users.
+
+Spacing
+==
+
+* No spaces between parentheses and arguments - i.e. ```foo(bar)```, not ```foo( bar )```
+
+Tabs
+--
+
+The tab width shall be 4 spaces.  Use spaces instead of tabs.
+
+Class/Struct Initialization
+==
+Constructors shall use initializer lists as follows:
+```cpp
+SomeClass()
+    : mExists(false)
+    , mCounter()
+    , mPtr()
+{}
+```
+
+* Initializations are one-per-line
+* Commas go at the beginning of the line rather than the end
+* The order of the list must match the order of declaration in the class
+* Any member with a default value should leave out the optional *NULL* or *0* - e.g. ```foo()```, not ```foo(NULL)```

+ 0 - 14
CodeConventions.txt

@@ -1,14 +0,0 @@
-       ===============================================
-        The Asset-Importer-Library Coding conventions
-       ===============================================
-
-	If you want to participate to the Asset-Importer_Library please have a look
-	onto these coding conventions and try to follow them. They are more or less
-	some kind of guide line to help others coming into the code and help all
-	the Asset-Importer-Library users.
-	
-	 Tab width
-	===========
-	The tab width shall be 4 spaces.
-	
-