diff options
author | Yang Rong <rong.r.yang@intel.com> | 2015-02-11 15:44:57 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2015-02-11 16:32:50 +0800 |
commit | 956c3dddaa9551ea0ed29a75badd6fa3e50bcfea (patch) | |
tree | e5df537ecd4d5decb9abb75900ed7eac6a8a400d | |
parent | e830f258d0fdd91392eaf44dd5e64642b2ff3118 (diff) |
Change the KB and MB define to enum.
Using the enum to avoid name conflict.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r-- | backend/src/sys/platform.hpp | 10 |
1 files 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 <typename T> struct AlignOf { |