Navigation Menu

Skip to content

Commit

Permalink
doc coding-style: add about boolean literal
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 15, 2012
1 parent 2c932ec commit ba28f72
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/source/developer/coding_style.rst
Expand Up @@ -421,3 +421,13 @@ bool型を用いる

int is_searching;

真偽値のリテラルには ``true`` または ``false`` を用いる
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

よい例:

bool is_searching = true;

悪い例( ``0`` 以外の値を真の値として用いている):

bool is_searching = 1;

0 comments on commit ba28f72

Please sign in to comment.