1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-08 21:17:43 +03:00

F #4845: Fix ActionSet class

This commit is contained in:
Ruben S. Montero 2017-01-31 22:12:35 +01:00
parent b516e36ea9
commit ee5f9fa57d

View File

@ -42,12 +42,12 @@ public:
/* Set the action in the set */ /* Set the action in the set */
void set(T action) void set(T action)
{ {
action_set |= 1 << static_cast<int>(action); action_set |= 1UL << static_cast<int>(action);
}; };
void clear(T action) void clear(T action)
{ {
action_set &= (~ (1 << static_cast<int>(action))); action_set &= (~ (1UL << static_cast<int>(action)));
}; };
/** /**
@ -57,7 +57,7 @@ public:
*/ */
bool is_set(T action) const bool is_set(T action) const
{ {
return (action_set & (1 << static_cast<int>(action))) != 0; return (action_set & (1UL << static_cast<int>(action))) != 0;
}; };
private: private: