Commit 6d0be449 authored by qsr's avatar qsr Committed by Commit bot

Fully qualify usage of ArraySizeHelper to prevent conflict.

mojo redefines ArraySizeHelper in the mojo namespace. When arraysize is used
in the mojo namespace, with both version in scope, the compiler, on android, is complaining that the reference is
not unique. To prevent this, qualify the usage of ArraySizeHelper in
base/macros.h

Review URL: https://codereview.chromium.org/804023002

Cr-Commit-Position: refs/heads/master@{#315290}
parent 1a600c7b
...@@ -63,7 +63,7 @@ template <typename T, size_t N> ...@@ -63,7 +63,7 @@ template <typename T, size_t N>
char (&ArraySizeHelper(const T (&array)[N]))[N]; char (&ArraySizeHelper(const T (&array)[N]))[N];
#endif #endif
#define arraysize(array) (sizeof(ArraySizeHelper(array))) #define arraysize(array) (sizeof(::ArraySizeHelper(array)))
// Use implicit_cast as a safe version of static_cast or const_cast // Use implicit_cast as a safe version of static_cast or const_cast
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// arraysize borrowed from basictypes.h // arraysize borrowed from basictypes.h
template <typename T, size_t N> template <typename T, size_t N>
char (&ArraySizeHelper(T (&array)[N]))[N]; char (&ArraySizeHelper(T (&array)[N]))[N];
#define arraysize(array) (sizeof(ArraySizeHelper(array))) #define arraysize(array) (sizeof(::ArraySizeHelper(array)))
namespace mini_installer { namespace mini_installer {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment