Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: core/fxcrt/fx_memory.h

Issue 2382723003: Move core/fxcrt/include to core/fxcrt (Closed)
Patch Set: Rebase to master Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcrt/fx_extension_unittest.cpp ('k') | core/fxcrt/fx_safe_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/fx_memory.h
diff --git a/core/fxcrt/include/fx_memory.h b/core/fxcrt/fx_memory.h
similarity index 86%
rename from core/fxcrt/include/fx_memory.h
rename to core/fxcrt/fx_memory.h
index a3eba2fd79baa42a325333a445c9278c7571b49c..beb194fbda4507b1e26f6a8c8fc0498b8671d4d6 100644
--- a/core/fxcrt/include/fx_memory.h
+++ b/core/fxcrt/fx_memory.h
@@ -4,10 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef CORE_FXCRT_INCLUDE_FX_MEMORY_H_
-#define CORE_FXCRT_INCLUDE_FX_MEMORY_H_
+#ifndef CORE_FXCRT_FX_MEMORY_H_
+#define CORE_FXCRT_FX_MEMORY_H_
-#include "core/fxcrt/include/fx_system.h"
+#include "core/fxcrt/fx_system.h"
#ifdef __cplusplus
extern "C" {
@@ -63,15 +63,15 @@ inline void* FX_ReallocOrDie(void* ptr,
}
// Never returns nullptr.
-#define FX_Alloc(type, size) (type*) FX_AllocOrDie(size, sizeof(type))
-#define FX_Alloc2D(type, w, h) (type*) FX_AllocOrDie2D(w, h, sizeof(type))
+#define FX_Alloc(type, size) (type*)FX_AllocOrDie(size, sizeof(type))
+#define FX_Alloc2D(type, w, h) (type*)FX_AllocOrDie2D(w, h, sizeof(type))
#define FX_Realloc(type, ptr, size) \
- (type*) FX_ReallocOrDie(ptr, size, sizeof(type))
+ (type*)FX_ReallocOrDie(ptr, size, sizeof(type))
// May return nullptr.
-#define FX_TryAlloc(type, size) (type*) calloc(size, sizeof(type))
+#define FX_TryAlloc(type, size) (type*)calloc(size, sizeof(type))
#define FX_TryRealloc(type, ptr, size) \
- (type*) FX_SafeRealloc(ptr, size, sizeof(type))
+ (type*)FX_SafeRealloc(ptr, size, sizeof(type))
#define FX_Free(ptr) free(ptr)
@@ -88,7 +88,7 @@ inline void* FX_ReallocOrDie(void* ptr,
// Note that the function doesn't need an implementation, as we only
// use its type.
template <typename T, size_t N>
-char(&ArraySizeHelper(T(&array)[N]))[N];
+char (&ArraySizeHelper(T (&array)[N]))[N];
// Used with std::unique_ptr to FX_Free raw memory.
struct FxFreeDeleter {
@@ -109,4 +109,4 @@ std::unique_ptr<T> WrapUnique(T* ptr) {
#endif // __cplusplus
-#endif // CORE_FXCRT_INCLUDE_FX_MEMORY_H_
+#endif // CORE_FXCRT_FX_MEMORY_H_
« no previous file with comments | « core/fxcrt/fx_extension_unittest.cpp ('k') | core/fxcrt/fx_safe_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698