mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2024-12-01 13:24:25 +01:00
Fix sourcehook compilation warning (#106)
Fix sourcehook compilation warning. Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
This commit is contained in:
parent
86b5917309
commit
2261ff4f9c
@ -1,4 +1,4 @@
|
|||||||
CPP = gcc
|
CPP = clang
|
||||||
|
|
||||||
default: shworker
|
default: shworker
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ expansion.
|
|||||||
Installation (for VC6, if you want to use .HOH as the extension instead):
|
Installation (for VC6, if you want to use .HOH as the extension instead):
|
||||||
Go into the registry and change
|
Go into the registry and change
|
||||||
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++\FileExtensions from cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2
|
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++\FileExtensions from cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2
|
||||||
to cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2;hoh by adding “;hoh” to the end.
|
to cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2;hoh by adding <EFBFBD>;hoh<EFBFBD> to the end.
|
||||||
Then add this as a custom build step to the main file of your project:
|
Then add this as a custom build step to the main file of your project:
|
||||||
hopter $(InputDir)\*.hoh $(InputDir)\*.h
|
hopter $(InputDir)\*.hoh $(InputDir)\*.h
|
||||||
|
|
||||||
@ -79,6 +79,7 @@ expansion.
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
// This is a quick-n-dirty implementation of a CString replacement.
|
// This is a quick-n-dirty implementation of a CString replacement.
|
||||||
// It promises nothing more than to provide enough functionality to get
|
// It promises nothing more than to provide enough functionality to get
|
||||||
@ -327,7 +328,7 @@ void PrintVarArgs(FILE *fout, CString bigblock, int num) {
|
|||||||
bigblock.Replace("@INVOKEARGS,", invokelist + commastr);
|
bigblock.Replace("@INVOKEARGS,", invokelist + commastr);
|
||||||
bigblock.Replace("@INVOKEARGS", invokelist);
|
bigblock.Replace("@INVOKEARGS", invokelist);
|
||||||
|
|
||||||
fprintf(fout, bigblock);
|
fputs(bigblock, fout);
|
||||||
}
|
}
|
||||||
|
|
||||||
int action_hopter(int numargs, const char *filenamein, const char *filenameout)
|
int action_hopter(int numargs, const char *filenamein, const char *filenameout)
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <cstring>
|
||||||
#include "stdio.h"
|
#include "stdio.h"
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
@ -1043,6 +1043,7 @@ SourceHook::CallClass<T> *SH_GET_CALLCLASS(T *p)
|
|||||||
{ \
|
{ \
|
||||||
FD m_Deleg; \
|
FD m_Deleg; \
|
||||||
CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \
|
CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \
|
||||||
|
virtual ~CMyDelegateImpl() {} \
|
||||||
ret_type Call params_decl { return m_Deleg params_pass; } \
|
ret_type Call params_decl { return m_Deleg params_pass; } \
|
||||||
void DeleteThis() { delete this; } \
|
void DeleteThis() { delete this; } \
|
||||||
bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast<CMyDelegateImpl*>(pOtherDeleg)->m_Deleg; } \
|
bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast<CMyDelegateImpl*>(pOtherDeleg)->m_Deleg; } \
|
||||||
@ -1054,6 +1055,7 @@ SourceHook::CallClass<T> *SH_GET_CALLCLASS(T *p)
|
|||||||
{ \
|
{ \
|
||||||
FD m_Deleg; \
|
FD m_Deleg; \
|
||||||
CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \
|
CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \
|
||||||
|
virtual ~CMyDelegateImpl() {} \
|
||||||
void Call params_decl { m_Deleg params_pass; } \
|
void Call params_decl { m_Deleg params_pass; } \
|
||||||
void DeleteThis() { delete this; } \
|
void DeleteThis() { delete this; } \
|
||||||
bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast<CMyDelegateImpl*>(pOtherDeleg)->m_Deleg; } \
|
bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast<CMyDelegateImpl*>(pOtherDeleg)->m_Deleg; } \
|
||||||
|
@ -1043,6 +1043,7 @@ SourceHook::CallClass<T> *SH_GET_CALLCLASS(T *p)
|
|||||||
{ \
|
{ \
|
||||||
FD m_Deleg; \
|
FD m_Deleg; \
|
||||||
CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \
|
CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \
|
||||||
|
virtual ~CMyDelegateImpl() {} \
|
||||||
ret_type Call params_decl { return m_Deleg params_pass; } \
|
ret_type Call params_decl { return m_Deleg params_pass; } \
|
||||||
void DeleteThis() { delete this; } \
|
void DeleteThis() { delete this; } \
|
||||||
bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast<CMyDelegateImpl*>(pOtherDeleg)->m_Deleg; } \
|
bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast<CMyDelegateImpl*>(pOtherDeleg)->m_Deleg; } \
|
||||||
@ -1054,6 +1055,7 @@ SourceHook::CallClass<T> *SH_GET_CALLCLASS(T *p)
|
|||||||
{ \
|
{ \
|
||||||
FD m_Deleg; \
|
FD m_Deleg; \
|
||||||
CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \
|
CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \
|
||||||
|
virtual ~CMyDelegateImpl() {} \
|
||||||
void Call params_decl { m_Deleg params_pass; } \
|
void Call params_decl { m_Deleg params_pass; } \
|
||||||
void DeleteThis() { delete this; } \
|
void DeleteThis() { delete this; } \
|
||||||
bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast<CMyDelegateImpl*>(pOtherDeleg)->m_Deleg; } \
|
bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast<CMyDelegateImpl*>(pOtherDeleg)->m_Deleg; } \
|
||||||
|
Loading…
Reference in New Issue
Block a user