Bug 1265624 - Remove unnecessary compiler version check for MSVS 2010 in nsFrameState.h. r=heycam
authorChris Peterson <cpeterson@mozilla.com>
Sun, 17 Apr 2016 17:09:32 -0700
changeset 334068 e01e469616b5d5b9015452ada8573a12f85935af
parent 334067 4ad8af91152fbac238031b1409aada31fd4b95f7
child 334069 f81e6e5226fbc7b0bbe19711c219177feca4d8dc
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1265624
milestone48.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 1265624 - Remove unnecessary compiler version check for MSVS 2010 in nsFrameState.h. r=heycam
layout/generic/nsFrameState.h
--- a/layout/generic/nsFrameState.h
+++ b/layout/generic/nsFrameState.h
@@ -15,40 +15,16 @@
 
 class nsIFrame;
 #endif
 
 typedef uint64_t nsFrameState_size_t;
 
 #define NS_FRAME_STATE_BIT(n_) (nsFrameState(nsFrameState_size_t(1) << (n_)))
 
-#if (_MSC_VER == 1600)
-/*
- * Visual Studio 2010 has trouble with the sized enum.  Although sized enums
- * are supported, two problems arise:
- *
- *   1. Implicit conversions from the enum type to the equivalently sized
- *      integer size are not performed, leading to many compile errors.
- *   2. Even with explicit casts added to avoid the errors from (1), odd
- *      test failures result, which might well be due to a compiler bug.
- *
- * So with VS2010 we use consts for the state bits and forgo the increased
- * type safety of the enum.  (Visual Studio 2012 has no problem with
- * nsFrameState being a sized enum, however.)
- */
-
-typedef nsFrameState_size_t nsFrameState;
-
-#define FRAME_STATE_BIT(group_, value_, name_) \
-const nsFrameState name_ = NS_FRAME_STATE_BIT(value_);
-#include "nsFrameStateBits.h"
-#undef FRAME_STATE_BIT
-
-#else
-
 enum nsFrameState : nsFrameState_size_t {
 #define FRAME_STATE_BIT(group_, value_, name_) \
   name_ = NS_FRAME_STATE_BIT(value_),
 #include "nsFrameStateBits.h"
 #undef FRAME_STATE_BIT
 };
 
 inline nsFrameState operator|(nsFrameState aLeft, nsFrameState aRight)
@@ -84,18 +60,16 @@ inline nsFrameState operator^(nsFrameSta
 }
 
 inline nsFrameState& operator^=(nsFrameState& aLeft, nsFrameState aRight)
 {
   aLeft = aLeft ^ aRight;
   return aLeft;
 }
 
-#endif
-
 // Bits 20-31 and 60-63 of the frame state are reserved for implementations.
 #define NS_FRAME_IMPL_RESERVED                      nsFrameState(0xF0000000FFF00000)
 #define NS_FRAME_RESERVED                           ~NS_FRAME_IMPL_RESERVED
 
 namespace mozilla {
 #ifdef DEBUG
 nsCString GetFrameState(nsIFrame* aFrame);
 void PrintFrameState(nsIFrame* aFrame);