Change:
struct CodeBlobType {
enum { [...] }
}
To:
enum class CodeBlobType {
[...]
};
Using C++11 scoped enums provides a more clear view of intent, as enums can be enforced by the type system instead of being passed around as ints. While still providing the underlying int type through static_cast when it is needed. (Such as marshalling to Java or JFR serialisation)
struct CodeBlobType {
enum { [...] }
}
To:
enum class CodeBlobType {
[...]
};
Using C++11 scoped enums provides a more clear view of intent, as enums can be enforced by the type system instead of being passed around as ints. While still providing the underlying int type through static_cast when it is needed. (Such as marshalling to Java or JFR serialisation)