summaryrefslogtreecommitdiff
path: root/gc_cpp.cc
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-12-26 10:22:29 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-12-26 10:22:29 +0400
commit2ea2a650ec840934bc427560c646ebfac7fa6798 (patch)
tree71d2e7cc9934630f846185303aba48b3fd4ae705 /gc_cpp.cc
parent6dba651862b108d79d097b3d31868c561b79927f (diff)
downloadbdwgc-2ea2a650ec840934bc427560c646ebfac7fa6798.tar.gz
Reformat code of gc_cpp.cc/h
* gc_cpp.cc (new, new[], delete[]): Reformat code. * include/gc_cpp.h (GCPlacement, gc, gc_cleanup, new, new[], delete, cleanup): Likewise.
Diffstat (limited to 'gc_cpp.cc')
-rw-r--r--gc_cpp.cc66
1 files changed, 33 insertions, 33 deletions
diff --git a/gc_cpp.cc b/gc_cpp.cc
index eaf70fb1..229a0c3e 100644
--- a/gc_cpp.cc
+++ b/gc_cpp.cc
@@ -19,56 +19,56 @@ linker finds this module before the library that defines the default
built-in "new" and "delete".
**************************************************************************/
-# ifdef HAVE_CONFIG_H
-# include "private/config.h"
-# endif
+#ifdef HAVE_CONFIG_H
+# include "private/config.h"
+#endif
-# ifndef GC_BUILD
-# define GC_BUILD
-# endif
+#ifndef GC_BUILD
+# define GC_BUILD
+#endif
#include "gc_cpp.h"
void* operator new( size_t size ) {
- return GC_MALLOC_UNCOLLECTABLE( size );}
+ return GC_MALLOC_UNCOLLECTABLE(size);
+}
#if !defined(__CYGWIN__)
void operator delete( void* obj ) {
- GC_FREE( obj );
+ GC_FREE(obj);
}
#endif /* !__CYGWIN__ */
#ifdef GC_OPERATOR_NEW_ARRAY
+ void* operator new[]( size_t size ) {
+ return GC_MALLOC_UNCOLLECTABLE(size);
+ }
-void* operator new[]( size_t size ) {
- return GC_MALLOC_UNCOLLECTABLE( size );}
-
-void operator delete[]( void* obj ) {
- GC_FREE( obj );}
-
+ void operator delete[]( void* obj ) {
+ GC_FREE(obj);
+ }
#endif /* GC_OPERATOR_NEW_ARRAY */
#ifdef _MSC_VER
-// This new operator is used by VC++ in case of Debug builds !
-void* operator new( size_t size,
- int ,//nBlockUse,
- const char * szFileName,
- int nLine )
-{
-#ifndef GC_DEBUG
- return GC_malloc_uncollectable( size );
-#else
- return GC_debug_malloc_uncollectable(size, szFileName, nLine);
-#endif
-}
+ // This new operator is used by VC++ in case of Debug builds!
+ void* operator new( size_t size, int /* nBlockUse */,
+ const char * szFileName, int nLine )
+ {
+# ifndef GC_DEBUG
+ return GC_malloc_uncollectable(size);
+# else
+ return GC_debug_malloc_uncollectable(size, szFileName, nLine);
+# endif
+ }
-#if _MSC_VER > 1020
-// This new operator is used by VC++ 7.0 and later in Debug builds.
-void* operator new[](size_t size, int nBlockUse, const char* szFileName, int nLine)
-{
- return operator new(size, nBlockUse, szFileName, nLine);
-}
-#endif
+# if _MSC_VER > 1020
+ // This new operator is used by VC++ 7.0 and later in Debug builds.
+ void* operator new[]( size_t size, int nBlockUse,
+ const char* szFileName, int nLine )
+ {
+ return operator new(size, nBlockUse, szFileName, nLine);
+ }
+# endif
#endif /* _MSC_VER */