Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

fogcreek shellext: use #pragma once to prevent multiple inclusions

Changeset 34d5e3a3faa1

Parent 652e3e046cc4

by David Golub

Changes to 17 files · Browse files at 34d5e3a3faa1 Showing diff from parent 652e3e046cc4 Diff from another changeset...

 
15
16
17
18
19
20
 
21
22
23
 
42
43
44
45
46
47
 
15
16
17
 
 
 
18
19
20
21
 
40
41
42
 
 
 
@@ -15,9 +15,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef DIRECTORY_H -#define DIRECTORY_H - +#pragma once  #include "Direntry.h"    class CDirectory @@ -42,6 +40,3 @@
    void Print() const;  }; - -#endif -
 
14
15
16
 
 
17
18
19
 
14
15
16
17
18
19
20
21
@@ -14,6 +14,8 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   +#pragma once +  class CDirectoryStatus  {   struct CEntry
 
15
16
17
18
19
20
 
21
22
23
 
51
52
53
54
55
 
15
16
17
 
 
 
18
19
20
21
 
49
50
51
 
 
@@ -15,9 +15,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef DIRENTRY_H -#define DIRENTRY_H - +#pragma once  #include <stdint.h>    class CWinstat; @@ -51,5 +49,3 @@
  }  };   -#endif -
 
15
16
17
18
19
20
 
21
22
23
 
50
51
52
53
54
 
15
16
17
 
 
 
18
19
20
21
 
48
49
50
 
 
@@ -15,9 +15,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _DIRSTATE_H -#define _DIRSTATE_H - +#pragma once  #include "Directory.h"    #define HASH_LENGTH 20 @@ -50,5 +48,3 @@
  CDirstate() :   m_dirRoot(0, "", ""), m_nNumAdded(0), m_nNumEntries(0) {}  }; - -#endif
 
15
16
17
18
19
 
20
21
22
 
49
50
51
52
53
 
15
16
17
 
 
18
19
20
21
 
48
49
50
 
 
@@ -15,8 +15,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _DIRSTATECACHE_H -#define _DIRSTATECACHE_H +#pragma once    class CDirstate;   @@ -49,5 +48,3 @@
  bool& bUnset, bool bUseKbfiles = false);   static void Invalidate(const CString& strHgRoot, bool bUseKbfiles = false);  }; - -#endif
 
13
14
15
16
17
 
18
19
20
21
22
 
13
14
15
 
 
16
17
18
19
 
 
@@ -13,10 +13,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _QUERY_DIRSTATE_H -#define _QUERY_DIRSTATE_H +#pragma once    int HgQueryDirstate(char chClass, const CString& strPath, char chFilterStatus,   char& chOutStatus); - -#endif
 
13
14
15
16
17
 
18
19
20
21
 
13
14
15
 
 
16
17
18
 
 
@@ -13,9 +13,6 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef REGISTRY_CONFIG_H_ -#define REGISTRY_CONFIG_H_ +#pragma once    int GetRegistryConfig(const CString& strName, CString& strRes); - -#endif
 
16
17
18
19
20
 
21
22
23
24
25
 
16
17
18
 
 
19
20
21
22
 
 
@@ -16,10 +16,7 @@
 // along with this program; if not, write to the Free Software  // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.   -#ifndef _STRING_UTILS_H -#define _STRING_UTILS_H +#pragma once    // Quotes a string  CString Quote(const CString& str); - -#endif
 
14
15
16
17
18
 
19
20
21
 
39
40
41
42
43
 
14
15
16
 
 
17
18
19
20
 
38
39
40
 
 
@@ -14,8 +14,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _THGSTATUS_H -#define _THGSTATUS_H +#pragma once    class CTHgStatus  { @@ -39,5 +38,3 @@
  return SendRequest("terminate|");   }  }; - -#endif
 
13
14
15
16
17
 
18
19
20
21
 
13
14
15
 
 
16
17
18
 
 
@@ -13,9 +13,6 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _THGVERSION_H -#define _THGVERSION_H +#pragma once    extern const CString THgVersion; - -#endif
 
13
14
15
16
17
 
18
19
20
 
80
81
82
83
84
 
13
14
15
 
 
16
17
18
19
 
79
80
81
 
 
@@ -13,8 +13,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _CShellExtCMenu_h_ -#define _CShellExtCMenu_h_ +#pragma once    struct CMenuDescription  { @@ -80,5 +79,3 @@
    DECLARE_REGISTRY_RESOURCEID(IDR_CMENU)  }; - -#endif
 
13
14
15
16
17
18
 
19
20
21
 
38
39
40
41
42
 
13
14
15
 
 
 
16
17
18
19
 
36
37
38
 
 
@@ -13,9 +13,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _CShellExtDnd_h_ -#define _CShellExtDnd_h_ - +#pragma once  #include "TortoiseHgCmenu.h"    // CTortoiseHgCmenuBase implements IContextMenu3, IShellExtInit @@ -38,5 +36,3 @@
  // IShellExtInit   STDMETHOD(Initialize)(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID);  }; - -#endif
 
13
14
15
16
17
 
18
19
20
 
77
78
79
80
81
 
13
14
15
 
 
16
17
18
19
 
76
77
78
 
 
@@ -13,8 +13,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _CShellExtOverlay_h_ -#define _CShellExtOverlay_h_ +#pragma once    class CTortoiseHgOverlay :   public CComObjectRootEx<CComMultiThreadModel>, @@ -77,5 +76,3 @@
    DECLARE_REGISTRY_RESOURCEID(IDR_UNVERSIONED)  }; - -#endif
 
13
14
15
16
17
 
18
19
20
21
 
13
14
15
 
 
16
17
18
 
 
@@ -13,9 +13,6 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef TORTOISE_ICON_BITMAP_H_ -#define TORTOISE_ICON_BITMAP_H_ +#pragma once    HBITMAP GetTortoiseIconBitmap(const CString& strIconName); - -#endif
 
13
14
15
16
17
 
18
19
20
 
28
29
30
31
32
 
13
14
15
 
 
16
17
18
19
 
27
28
29
 
 
@@ -13,8 +13,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _TORTOISE_UTILS_H_ -#define _TORTOISE_UTILS_H_ +#pragma once    CString GetTHgProgRoot();  CString GetTemporaryFile(LPCSTR strPrefix = "THG"); @@ -28,5 +27,3 @@
 int GetRegSZValueW(HKEY hKey, LPCWSTR lpszName, CStringW& strRes);  bool StartsWith(const CString& strWhole, const CString& strPrefix);  void Tokenize(CString str, CAtlList<CString>& rTokens, LPCTSTR lpszDelimiters = " "); - -#endif
 
14
15
16
17
18
 
19
20
21
 
26
27
28
29
30
 
14
15
16
 
 
17
18
19
20
 
25
26
27
 
 
@@ -14,8 +14,7 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef WINSTAT_H -#define WINSTAT_H +#pragma once    class CWinstat  { @@ -26,5 +25,3 @@
    int lstat(LPCTSTR lpszFile, bool bTime64 = false);  }; - -#endif
 
13
14
15
16
17
 
18
19
20
21
22
23
24
25
 
 
 
26
27
28
 
32
33
34
35
36
37
 
13
14
15
 
 
16
17
 
 
 
 
 
 
 
18
19
20
21
22
23
 
27
28
29
 
 
 
@@ -13,16 +13,11 @@
 // You should have received a copy of the GNU General Public License  // along with this program. If not, see <http://www.gnu.org/licenses/>.   -#ifndef _STDAFX_H_ -#define _STDAFX_H_ +#pragma once   -/* - Per MingW's winder.h: - * If you need Win32 API features newer the Win95 and WinNT then you must - * define WINVER before including windows.h or any other method of including - * the windef.h header. - */ -#define WINVER 0x0500 // need to enable hbmpItem member in MENUITEMINFO +// WINVER must be defined as at least 0x0500 in order to have access to the hbmpItem +// member in MENUITEMINFO. +#define WINVER 0x0500    #include "resource.h"   @@ -32,6 +27,3 @@
 #include <atlstr.h>  #include <atlcoll.h>  #include <shlobj.h> - -#endif -