Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualbrx

Posted 20 September 2012 - 01:46 AM

Actually, your new operator is amibouos because of the default parameters. It now has the same signature as the regular new operator (the first parameter is filled by the compiler). Leave out the default parameters and you'll be fine. Then use macros (yeah, I know... bad time ;) ) to replace all occurences of new with your version:
void* operator new(size_t size, const char* szFile, unsigned int nLineNo);
#define MY_NEW new(__FILE__, __LINE__)
#define new MY_NEW

#1brx

Posted 20 September 2012 - 01:46 AM

Actually, your new operator is amibouos because of the default parameters. It now has the same signature as the regular new operator (the first parameter is filled by the compiler). Leave out the default parameters and you'll be fine. Then use macros (yeah, I know... bad time ;) ) to replace all occurences of new with your version:
#define MY_NEW new(__FILE__, __LINE__)
#define new MY_NEW

PARTNERS