Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8257912

Convert enum iteration to use range-based for loops

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 17
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b01

      Description

      Convert the more verbose syntax:

        for (vmIntrinsicsIterator it = vmIntrinsicsRange.begin(); it != vmIntrinsicsRange.end(); ++it) {
          vmIntrinsicID index = *it;
          nt[as_int(index)] = string;
        }

      to

        for (vmIntrinsicID index : EnumRange<vmIntrinsicID>{}) {
          nt[as_int(index)] = string;
        }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iklam Ioi Lam
              Reporter:
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: