]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/SquidNew.cc
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / SquidNew.cc
index 8affaf168d63345f811b56e98359f82b2e792514..27fe9b6fec02a9d0ce7f1164f5ea0d3630f10fd0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -8,29 +8,20 @@
 
 /* DEBUG: none          Memory Allocation */
 
-#define _SQUID_EXTERNNEW_
-
 #include "squid.h"
 
-#ifdef __SUNPRO_CC
+#if !defined(__clang__) && !defined(__SUNPRO_CC)
 
 #include <new>
-void *operator new(size_t size) throw (std::bad_alloc)
-{
-    return xmalloc(size);
-}
-void operator delete (void *address) throw()
-{
-    xfree (address);
-}
-void *operator new[] (size_t size) throw (std::bad_alloc)
+
+void *operator new(size_t size)
 {
     return xmalloc(size);
 }
-void operator delete[] (void *address) throw()
+void operator delete(void *address)
 {
-    xfree (address);
+    xfree(address);
 }
 
-#endif /* __SUNPRO_CC */
+#endif /* !defined(__clang__) */