Skip to content

Commit a2e4ee1

Browse files
committed
Enable ValueType bitmasking
1 parent 1c67ddc commit a2e4ee1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

include/scratchcpp/valuedata.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <string>
66

77
#include "global.h"
8+
#include "enum_bitmask.h"
89

910
namespace libscratchcpp
1011
{
@@ -13,12 +14,15 @@ struct StringPtr;
1314

1415
enum class LIBSCRATCHCPP_EXPORT ValueType
1516
{
16-
Number = 0,
17-
Bool = 1,
18-
String = 2,
19-
Pointer = 3
17+
Void = 0,
18+
Number = 1 << 0,
19+
Bool = 1 << 1,
20+
String = 1 << 2,
21+
Pointer = 1 << 3
2022
};
2123

24+
constexpr bool enable_enum_bitmask(ValueType);
25+
2226
extern "C"
2327
{
2428
/*! \brief The ValueData struct holds the data of Value. It's used in compiled Scratch code for better performance. */

0 commit comments

Comments
 (0)