Bug 1448387: Use alignof() in HasFreeLSB. r=froydnj
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 23 Mar 2018 17:38:14 +0100
changeset 409733 631ba17b09cf52a064e74aac243f191a2c41e69a
parent 409732 342633799d0850f79cf27db8c826cdc4149a2cd9
child 409734 3252f6b9d8c6cb4d79f0203cc78ac13d6084baab
push id33699
push userccoroiu@mozilla.com
push dateSat, 24 Mar 2018 09:42:51 +0000
treeherdermozilla-central@945baa8bc960 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1448387, 1288016
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1448387: Use alignof() in HasFreeLSB. r=froydnj This doesn't seem relevant for the differences between MOZ_ALIGNOF and alignof mentioned in bug 1288016. MozReview-Commit-ID: 8f9Ui7Aecfj
mfbt/Result.h
--- a/mfbt/Result.h
+++ b/mfbt/Result.h
@@ -220,17 +220,17 @@ struct UnusedZero<T&>
 //
 // We begin by safely assuming types don't have a spare bit.
 template <typename T> struct HasFreeLSB { static const bool value = false; };
 
 // The lowest bit of a properly-aligned pointer is always zero if the pointee
 // type is greater than byte-aligned. That bit is free to use if it's masked
 // out of such pointers before they're dereferenced.
 template <typename T> struct HasFreeLSB<T*> {
-  static const bool value = (MOZ_ALIGNOF(T) & 1) == 0;
+  static const bool value = (alignof(T) & 1) == 0;
 };
 
 // We store references as pointers, so they have a free bit if a pointer would
 // have one.
 template <typename T> struct HasFreeLSB<T&> {
   static const bool value = HasFreeLSB<T*>::value;
 };