@@ -37,8 +37,7 @@ CColorCopApp::CColorCopApp() {
3737}
3838
3939CColorCopApp::~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
5453BOOL 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 }
0 commit comments