Skip to content

Commit

Permalink
Fix warning C4291
Browse files Browse the repository at this point in the history
  • Loading branch information
beholdnec committed Jun 21, 2022
1 parent e197d2f commit 68df72a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kauai/src/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ void *BASE::operator new(size_t cb)
}

#if defined(DEBUG) || defined(WIN)

/***************************************************************************
DEBUG : Unlink from linked list of allocated objects and free the memory.
***************************************************************************/
Expand All @@ -278,6 +279,14 @@ void BASE::operator delete(void *pv)
::delete (pv);
#endif //! WIN
}

#ifdef DEBUG
void BASE::operator delete(void *pv, schar *pszsFile, long lwLine)
{
BASE::operator delete(pv);
}
#endif // DEBUG

#endif // DEBUG || WIN

#ifdef DEBUG
Expand Down
1 change: 1 addition & 0 deletions kauai/src/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ class BASE
public:
#ifdef DEBUG
void *operator new(size_t cb, schar *pszsFile, long lwLine);
void operator delete(void *pv, schar *pszsFile, long lwLine); // To prevent warning C4291
void operator delete(void *pv);
void MarkMemStub(void);
#else //! DEBUG
Expand Down

0 comments on commit 68df72a

Please sign in to comment.