카테고리 없음

google coding style

살아가는 이유_EU 2019. 10. 28. 14:20
728x90
반응형

if 문을 쓸 때

 

loops 를 쓸 때

 

 

구글 코딩 스타일 에서는 -> tab 을 최대한 지양하고 다 space 를 이용해서 쓰도록 되어 있다.

while 문이나, for 문의 경우 쓰여지는 부분이 한 line 으로 압축 될 때, single line 에 다 써도 괜찮다고 설명하고 있음.

로직이 없다면 continue; 를 쓰도록 함.

 

[포인터의 경우]

포인터의 경우

 

포인터의 경우 * 나 -> 를 쓸 때, 그 속의 space 를 넣는건 가독성을 떨어트린다고 설명되어 있다.

 

[return] 의 경우

 

ㅠㅠ 이렇게 많은 indent 규칙이 있는지는 처음 알았따. 앞으로 야무지게 구글 코딩 스타일에 잘 맞춰서 코딩하기.

 

 

 

출처 : https://google.github.io/styleguide/cppguide.html#Functions

 

Google C++ Style Guide

Background C++ is one of the main development languages used by many of Google's open-source projects. As every C++ programmer knows, the language has many powerful features, but this power brings with it complexity, which in turn can make code more bug-pr

google.github.io

 

728x90
반응형