diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-03 08:49:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-03 08:49:06 +0000 |
commit | 1b2dd3c3b573294758648f8a82ef9108481550ba (patch) | |
tree | ec9d3f8e991badead99d6167d77ae53871f12588 /include | |
parent | 8b8845c8e142c2e70bc0c2785ddf3a91ad3f84bd (diff) |
fix for gcc compiler
git-svn-id: http://svn.miranda-ng.org/main/trunk@732 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/m_core.h | 14 | ||||
-rw-r--r-- | include/m_system.h | 7 |
2 files changed, 11 insertions, 10 deletions
diff --git a/include/m_core.h b/include/m_core.h index eddbe7ce74..b40dcfad30 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -210,7 +210,7 @@ MIR_CORE_DLL(void) TranslateDialog_LP(HWND hDlg, int hLang); MIR_CORE_DLL(unsigned int) mir_hash(const void * key, unsigned int len);
#pragma optimize("gt", on)
-__inline unsigned int mir_hashstr(const char * key)
+__forceinline unsigned int mir_hashstr(const char * key)
{
if (key == NULL) return 0;
else {
@@ -218,7 +218,7 @@ __inline unsigned int mir_hashstr(const char * key) return mir_hash(key, len);
} }
-__inline unsigned int mir_hashstrW(const wchar_t * key)
+__forceinline unsigned int mir_hashstrW(const wchar_t * key)
{
if (key == NULL) return 0;
else {
@@ -366,8 +366,8 @@ MIR_CORE_DLL(char*) ltrimp(char *str); // returns pointer to the trimmed portio MIR_CORE_DLL(int) wildcmp(char *name, char *mask);
-__inline char* lrtrim(char* str) { return ltrim(rtrim(str)); };
-__inline char* lrtrimp(char* str) { return ltrimp(rtrim(str)); };
+__forceinline char* lrtrim(char* str) { return ltrim(rtrim(str)); };
+__forceinline char* lrtrimp(char* str) { return ltrimp(rtrim(str)); };
///////////////////////////////////////////////////////////////////////////////
// text conversion functions
@@ -453,15 +453,15 @@ MIR_CORE_DLL(void) Thread_Wait(void); MIR_CORE_DLL(UINT_PTR) forkthread(pThreadFunc, unsigned long stacksize, void *arg);
MIR_CORE_DLL(UINT_PTR) forkthreadex(void *sec, unsigned stacksize, pThreadFuncEx, void* owner, void *arg, unsigned *thraddr);
-_inline HANDLE mir_forkthread(pThreadFunc aFunc, void* arg)
+__forceinline HANDLE mir_forkthread(pThreadFunc aFunc, void* arg)
{ return (HANDLE)forkthread(aFunc, 0, arg);
}
-__inline HANDLE mir_forkthreadex(pThreadFuncEx aFunc, void* arg, int stackSize, unsigned* pThreadID)
+__forceinline HANDLE mir_forkthreadex(pThreadFuncEx aFunc, void* arg, int stackSize, unsigned* pThreadID)
{ return (HANDLE)forkthreadex(NULL, stackSize, aFunc, NULL, arg, pThreadID);
}
-__inline HANDLE mir_forkthreadowner(pThreadFuncOwner aFunc, void* owner, void* arg, unsigned* pThreadID)
+__forceinline HANDLE mir_forkthreadowner(pThreadFuncOwner aFunc, void* owner, void* arg, unsigned* pThreadID)
{ return (HANDLE)forkthreadex(NULL, 0, (pThreadFuncEx)aFunc, owner, arg, pThreadID);
}
diff --git a/include/m_system.h b/include/m_system.h index 4cc9105773..db912fd32c 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -25,8 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <tchar.h>
-#include <m_core.h>
-
+ #ifndef MIRANDANAME
#define MIRANDANAME "Miranda IM"
#endif
@@ -46,7 +45,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __forceinline static FORCEINLINE
#else
#pragma warning(disable:4244 4245)
-#endif
+#endif
+#include <m_core.h>
+ //miranda/system/modulesloaded
//called after all modules have been successfully initialised
|