Change CodeBlobType from unscoped enum to enum class

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 20
    • Affects Version/s: 20
    • Component/s: hotspot
    • None
    • b10

      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)

            Assignee:
            Axel Boldt-Christmas
            Reporter:
            Axel Boldt-Christmas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: