Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

shellext: remove unused GET_SAFE, SET_SAFE from TortoiseUtils.h

Changeset 9cc075ad1380

Parent a5470ed89cf9

by Adrian Buehlmann

Changes to one file · Browse files at 9cc075ad1380 Showing diff from parent a5470ed89cf9 Diff from another changeset...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
1
2
3
4
5
6
7
8
9
10
11
12
 
 
 
 
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 #ifndef _TORTOISE_UTILS_H_  #define _TORTOISE_UTILS_H_    #include <malloc.h>  #include <windows.h>  #include <string>    #define _UNUSED_PARAMETER(p) \   { \   (p) = (p); \   }   -extern CRITICAL_SECTION g_critSectionBreak; -template <class T> T GET_SAFE( T a ) {EnterCriticalSection(&g_critSectionBreak); T z = a; LeaveCriticalSection(&g_critSectionBreak); return z;} -template <class T> void SET_SAFE( T & a , T b) {EnterCriticalSection(&g_critSectionBreak); a = b; LeaveCriticalSection(&g_critSectionBreak);} -  #ifndef ARRAYSIZE  #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))  #endif    extern int LocalToWideChar(LPWSTR pWide, LPTSTR pLocal, DWORD dwChars);  extern int WideCharToLocal(LPTSTR pLocal, LPWSTR pWide, DWORD dwChars);    #define _MBSTR(wstr) hf_wctomb((LPSTR)alloca(wcslen(wstr) + 1), (wstr),wcslen(wstr) + 1)  #define _WCSTR(str) hf_mbtowc((LPWSTR)alloca((strlen(str) + 1) * sizeof(WCHAR)),(str),strlen(str) + 1)    LPWSTR hf_mbtowc(LPWSTR lpw, LPCSTR lpa, int nChars);  LPSTR hf_wctomb(LPSTR lpa, LPCWSTR lpw, int nChars);    std::string GetTHgProgRoot();  std::string GetTHgShellRoot();  std::string GetTemporaryFile(LPCSTR prefix="THG");  bool IsDirectory(const std::string&);  std::string DirName(const std::string&);  std::string BaseName(const std::string&);  bool LaunchCommand(const std::string& command, const std::string& cwd);  HICON GetTortoiseIcon(const std::string & iconname);  std::string GetHgRepoRoot(const std::string& path);  bool IsHgRepo(const std::string& path);  int GetRegistryConfig(const std::string& name, std::string& res);  FILE* fopenReadRenameAllowed(const char* path);    #endif