mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1401111 - Use ContiguousEnumSerializer for EventMessage ParamTraits; r=botond
This commit is contained in:
parent
bcc8e2d1f7
commit
465eaf30eb
@ -21,23 +21,11 @@ namespace IPC
|
||||
{
|
||||
|
||||
template<>
|
||||
struct ParamTraits<mozilla::EventMessage>
|
||||
{
|
||||
typedef mozilla::EventMessage paramType;
|
||||
|
||||
static void Write(Message* aMsg, const paramType& aParam)
|
||||
{
|
||||
WriteParam(aMsg, static_cast<const mozilla::EventMessageType&>(aParam));
|
||||
}
|
||||
|
||||
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
||||
{
|
||||
mozilla::EventMessageType eventMessage = 0;
|
||||
bool ret = ReadParam(aMsg, aIter, &eventMessage);
|
||||
*aResult = static_cast<paramType>(eventMessage);
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
struct ParamTraits<mozilla::EventMessage> :
|
||||
public ContiguousEnumSerializer<mozilla::EventMessage,
|
||||
mozilla::EventMessage(0),
|
||||
mozilla::EventMessage::eEventMessage_MaxValue>
|
||||
{};
|
||||
|
||||
template<>
|
||||
struct ParamTraits<mozilla::BaseEventFlags>
|
||||
|
Loading…
Reference in New Issue
Block a user