From 956c3dddaa9551ea0ed29a75badd6fa3e50bcfea Mon Sep 17 00:00:00 2001 From: Yang Rong Date: Wed, 11 Feb 2015 15:44:57 +0800 Subject: Change the KB and MB define to enum. Using the enum to avoid name conflict. Signed-off-by: Yang Rong Reviewed-by: Zhigang Gong --- backend/src/sys/platform.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/src/sys/platform.hpp b/backend/src/sys/platform.hpp index e7aeee6a..173b880d 100644 --- a/backend/src/sys/platform.hpp +++ b/backend/src/sys/platform.hpp @@ -258,10 +258,14 @@ private: \ /*! Default alignment for the platform */ #define GBE_DEFAULT_ALIGNMENT 16 +namespace gbe +{ /*! Useful constants */ -#define KB 1024 -#define MB (KB*KB) - + enum { + KB = 1024, + MB = (KB*KB), + }; +} /*! Portable AlignOf */ template struct AlignOf { -- cgit v1.2.3