Skip to content

Commit 4e8ee4c

Browse files
committed
style: modernize headers and refine cpplint config
- Remove legacy include guards in SystemTray.h and colorspace.h in favor of `#pragma once` for clarity and consistency with modern MSVC conventions. - Stop disabling the build/header_guard cpplint rule now that guards are no longer needed. - Keep resource.h excluded since it is generated by the MFC resource editor.
1 parent d9458f9 commit 4e8ee4c

3 files changed

Lines changed: 3 additions & 16 deletions

File tree

CPPLINT.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ filter=-whitespace/braces,-whitespace/blank_line,-whitespace/comma,-whitespace/o
55
filter=-readability/casting,-readability/braces
66

77
# Disable build checks
8-
filter=-build/include_subdir,-build/include,-build/header_guard
8+
filter=-build/include_subdir,-build/include
99

1010
# resource.h is generated by the MFC resource editor
1111
exclude_files=resource.h

SystemTray.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@
2626
// that you have found/implemented and I will fix/incorporate them into this
2727
// file.
2828

29-
#ifndef _INCLUDED_SYSTEMTRAY_H_
30-
#define _INCLUDED_SYSTEMTRAY_H_
31-
32-
#include <afxtempl.h>
29+
#pragma once
3330

3431
/////////////////////////////////////////////////////////////////////////////
3532
// CSystemTray window
@@ -114,7 +111,4 @@ class CSystemTray : public CWnd
114111
DECLARE_MESSAGE_MAP()
115112
};
116113

117-
118-
#endif
119-
120114
/////////////////////////////////////////////////////////////////////////////

colorspace.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
// Copyright (c) 2024 Jay Prall
22
// SPDX-License-Identifier: MIT
33

4-
5-
6-
#ifndef COLORSPACE_H
7-
#define COLORSPACE_H
4+
#pragma once
85

96
COLORREF CMYK2RGB(BYTE c, BYTE m, BYTE y, BYTE k);
107

118
void RGB2CMYK(BYTE r, BYTE g, BYTE b, BYTE& c, BYTE& m, BYTE& y, BYTE& k);
129

13-
14-
1510
BYTE byRed = 0;
1611
BYTE byGreen = 0;
1712
BYTE byBlue = 0;
@@ -24,5 +19,3 @@ void RGB2CMYK(BYTE r, BYTE g, BYTE b, BYTE& c, BYTE& m, BYTE& y, BYTE& k);
2419
BYTE byMagenta = 0;
2520
BYTE byYellow = 0;
2621
BYTE byBlack = 0;
27-
28-
#endif //XCMYK_H

0 commit comments

Comments
 (0)