Skip to content

Commit 3a0114c

Browse files
committed
style: fix whitespace formatting for braces to satisfy cpplint
1 parent dcf8f5c commit 3a0114c

File tree

10 files changed

+253
-545
lines changed

10 files changed

+253
-545
lines changed

CPPLINT.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Disable whitespace checks
2-
filter=-whitespace/braces,-whitespace/comments,-whitespace/indent
2+
filter=-whitespace/comments,-whitespace/indent
33

44
# Disable readability checks
55
filter=-readability/casting,-readability/braces

ColorCop.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ CColorCopApp::CColorCopApp() {
3737
}
3838

3939
CColorCopApp::~CColorCopApp() {
40-
if (m_hMutex != nullptr)
41-
{
40+
if (m_hMutex != nullptr) {
4241
CloseHandle(m_hMutex);
4342
}
4443
}
@@ -53,11 +52,9 @@ CColorCopApp theApp;
5352

5453
BOOL CColorCopApp::InitInstance() {
5554
// multiple instances are not allowed?
56-
if (!(dlg.m_Appflags & MultipleInstances))
57-
{
55+
if (!(dlg.m_Appflags & MultipleInstances)) {
5856
// multiple instances are not allowed. check if we have one running
59-
if (InstanceRunning())
60-
{
57+
if (InstanceRunning()) {
6158
// TODO(j4y): find the current instance and bring forward instead of a msg. fixes issue #4
6259
AfxMessageBox(IDS_APP_RUNNING);
6360

@@ -107,7 +104,7 @@ BOOL CColorCopApp::GetShellFolderPath(char* pShellFolder, char* pShellPath) {
107104
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
108105
0, KEY_READ, &hkey);
109106

110-
if (rc == ERROR_SUCCESS){
107+
if (rc == ERROR_SUCCESS) {
111108
rc = RegQueryValueEx(hkey, pShellFolder, NULL, &type,
112109
(BYTE *) pShellPath, &length);
113110
RegCloseKey(hkey);
@@ -212,8 +209,7 @@ void CColorCopApp::CloseApplication() {
212209
strInitFile += INI_FILE;
213210

214211
CFile file;
215-
if (file.Open(strInitFile, CFile::modeWrite|CFile::modeCreate))
216-
{
212+
if (file.Open(strInitFile, CFile::modeWrite|CFile::modeCreate)) {
217213
CArchive ar(&file, CArchive::store);
218214
Serialize(ar);
219215
}

ColorCop.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
// See ColorCop.cpp for the implementation of this class
2323
//
2424

25-
class CColorCopApp : public CWinApp
26-
{
25+
class CColorCopApp : public CWinApp {
2726
public:
2827
CColorCopDlg dlg;
2928
CColorCopApp();

0 commit comments

Comments
 (0)