From 2f88a9a04eb922f7eb7307ca25a9b1cf5344b594 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 23 Feb 2016 16:55:59 +1100 Subject: [PATCH] Bug 1250396 (part 2) - Remove nsStaticAtomStringType. r=froydnj. It's only used in one file and obscures more than it enlightens. --- xpcom/ds/nsStaticAtom.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xpcom/ds/nsStaticAtom.h b/xpcom/ds/nsStaticAtom.h index 2bf96531d20..c0b44db804c 100644 --- a/xpcom/ds/nsStaticAtom.h +++ b/xpcom/ds/nsStaticAtom.h @@ -11,10 +11,12 @@ #include "nsStringBuffer.h" #include "mozilla/Logging.h" -typedef char16_t nsStaticAtomStringType; +#define NS_STATIC_ATOM(buffer_name, atom_ptr) \ + { (nsStringBuffer*) &buffer_name, atom_ptr } -#define NS_STATIC_ATOM(buffer_name, atom_ptr) { (nsStringBuffer*) &buffer_name, atom_ptr } -#define NS_STATIC_ATOM_BUFFER(buffer_name, str_data) static nsFakeStringBuffer< sizeof(str_data) > buffer_name = { 1, sizeof(str_data) * sizeof(nsStaticAtomStringType), MOZ_UTF16(str_data) }; +#define NS_STATIC_ATOM_BUFFER(buffer_name, str_data) \ + static nsFakeStringBuffer buffer_name = \ + { 1, sizeof(str_data) * sizeof(char16_t), MOZ_UTF16(str_data) }; /** * Holds data used to initialize large number of atoms during startup. Use @@ -37,7 +39,7 @@ struct nsFakeStringBuffer { int32_t mRefCnt; uint32_t mSize; - nsStaticAtomStringType mStringData[size]; + char16_t mStringData[size]; }; // Register an array of static atoms with the atom table