diff --git a/rEFIt_UEFI/libeg/nanosvg.cpp b/rEFIt_UEFI/libeg/nanosvg.cpp index f46ffd6e4..a15ebbbdc 100755 --- a/rEFIt_UEFI/libeg/nanosvg.cpp +++ b/rEFIt_UEFI/libeg/nanosvg.cpp @@ -210,13 +210,7 @@ void nsvg__outputDanglingPtr() } } #else - // When tracing allocation is not wanted (release version for exemple), we use macro. This way, the msg parameter is not compiled or evaluated. - // It prevents all the literal do be compiled and stored in the produced file. - #define nsvg__alloc(size, msg) AllocatePool(size) - #define nsvg__alloczero(size, msg) AllocateZeroPool(size) - #define nsvg__alloccopy(size, ref, msg) AllocateCopyPool(size, ref) - #define nsvg__realloc(oldsize, newsize, ref, msg) ReallocatePool(oldsize, newsize, ref) - #define nsvg__delete(buffer, msg) FreePool(buffer) + // Macros defined in header. #endif diff --git a/rEFIt_UEFI/libeg/nanosvg.h b/rEFIt_UEFI/libeg/nanosvg.h index 1ec142a00..446ac6aed 100644 --- a/rEFIt_UEFI/libeg/nanosvg.h +++ b/rEFIt_UEFI/libeg/nanosvg.h @@ -458,6 +458,14 @@ void* nsvg__realloc(UINTN oldsize, UINTN newsize, void* ref, const XString8& msg void nsvg__delete(void* buffer, const XString8& msg); size_t nsvg__nbDanglingPtr(); void nsvg__outputDanglingPtr(); +#else + // When tracing allocation is not wanted (release version for exemple), we use macro. This way, the msg parameter is not compiled or evaluated. + // It prevents all the literal do be compiled and stored in the produced file. + #define nsvg__alloc(size, msg) AllocatePool(size) + #define nsvg__alloczero(size, msg) AllocateZeroPool(size) + #define nsvg__alloccopy(size, ref, msg) AllocateCopyPool(size, ref) + #define nsvg__realloc(oldsize, newsize, ref, msg) ReallocatePool(oldsize, newsize, ref) + #define nsvg__delete(buffer, msg) FreePool(buffer) #endif bool isShapeInGroup(NSVGshape* shape, const char* groupName); diff --git a/rEFIt_UEFI/libeg/nanosvgrast.cpp b/rEFIt_UEFI/libeg/nanosvgrast.cpp index 44a07a44b..6c87ce35d 100644 --- a/rEFIt_UEFI/libeg/nanosvgrast.cpp +++ b/rEFIt_UEFI/libeg/nanosvgrast.cpp @@ -194,7 +194,7 @@ static void nsvg__resetPool(NSVGrasterizer* r) r->curpage = r->pages; } -static UINT8* nsvg__alloc(NSVGrasterizer* r, int size) +static UINT8* nsvgrast__alloc(NSVGrasterizer* r, int size) { UINT8* buf; if (size > NSVG__MEMPAGE_SIZE) return NULL; @@ -989,7 +989,7 @@ static NSVGactiveEdge* nsvg__addActive(NSVGrasterizer* r, NSVGedge* e, float sta r->freelist = z->next; } else { // Alloc new edge. - z = (NSVGactiveEdge*)nsvg__alloc(r, sizeof(NSVGactiveEdge)); + z = (NSVGactiveEdge*)nsvgrast__alloc(r, sizeof(NSVGactiveEdge)); if (z == NULL) return NULL; }