Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-14002

Unused local variable before loop

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Later
    • Adobe Flex SDK Previous
    • None
    • mx: TileList
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      On line 1691 of TileBase.as a local variable n in created which is then not used in the rest of the function.

      var n:int = listItems.length;

      On the following line 1692 there is a for loop that gets the same value listItems.length

      for (var i:int = 0; i < listItems.length; i++)

      It's fairly obvious looking at those 2 lines that a performance enhancement has tried to be implemented without being fully checked.

      My suggestion would be to change the 2 lines to read as follows:

      var n:int = listItems.length;
      for (var i:int = 0; i < n; i++)

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: