Commit Graph

6 Commits

Author SHA1 Message Date
Sylvestre Ledru
0075db5730 no bug, Align the \ at the end of the #defines DONTBUILD r=froydnj 2018-02-12 15:39:43 +01:00
Nicholas Nethercote
dc0d454657 Bug 1409227 (part 4) - Replace nsMemory::Clone(id, sizeof(nsID)) with nsID::Clone(id). r=mccr8.
This change requires introducing nsID::Clone(). Because it's infallible, the
patch also removes some redundant failure-handling code. (nsMemory::Clone() is
also infallible, so this code was redundant even before this change.)
2017-10-18 10:39:20 +11:00
Mike Hommey
aad7d9784b Bug 1369622 - Restore static asserts for lack of arguments on some macros. r=froydnj
Bug 1368932 removed MOZ_STATIC_ASSERT_VALID_ARG_COUNT because it didn't
actually work for large numbers of arguments. But it was kind of useful
for macros that expand to something broken when they are given no
variadic argument at all.

Now that we have a macro that doesn't require tricks to count empty
arguments lists, however, we can use straightforward static_asserts
instead of a generic macro, which has the side effect of providing more
context in the error message.
2017-06-02 15:07:58 +09:00
Mike Hommey
c7172828c2 Bug 1369622 - Use MOZ_ARG_COUNT instead of MOZ_PASTE_PREFIX_AND_ARG_COUNT. r=froydnj
In a couple places, MOZ_PASTE_PREFIX_AND_ARG_COUNT is used to only count
the number of arguments, we can now use MOZ_ARG_COUNT directly for that.
2017-06-02 15:06:34 +09:00
Mike Hommey
da31d3a4cd Bug 1368932 - Allow MOZ_PASTE_PREFIX_AND_ARG_COUNT to work with 0 arguments. r=froydnj
At the same time, remove the MOZ_STATIC_ASSERT_VALID_ARG_COUNT, which
doesn't actually work for more than 50 arguments(*), and which is now not
useful to detect 0 arguments.

(*) the build fails, but not directly thanks to the static_assert it
expands to.
2017-05-25 15:47:21 +09:00
Benjamin Smedberg
d1c8ee1d1b Bug 1332631 part B - file moves from xpcom/glue to xpcom/base, r=froydnj
MozReview-Commit-ID: ARS1aTugYjl
2017-01-23 09:24:01 -05:00