Bug 1265624 - Remove unnecessary compiler version check for MSVS 2010 in nsFrameState.h. r=heycam

This commit is contained in:
Chris Peterson 2016-04-17 17:09:32 -07:00
Родитель e81b2a134a
Коммит 75b5faab4d
1 изменённых файлов: 0 добавлений и 26 удалений

Просмотреть файл

@ -20,30 +20,6 @@ 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_),
@ -89,8 +65,6 @@ inline nsFrameState& operator^=(nsFrameState& aLeft, nsFrameState 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