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

Convert enum iteration to use range-based for loops

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 16
    • 17
    • hotspot
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: