Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116413

Use proper types for indices

    XMLWordPrintable

Details

    Description

      Currently, we have many places in the code base which use int to represent indices. We should port them to enum classes as

      • arithmetic on indices doesn't make sense (in general)
      • separate indices should have separate types to avoid confusion; that is especially important given that we have some functions taking more than one index type
      • using enums gives us a natural way to give invalid/default/other special states a name (instead of passing around magic numbers like -1 or INT_MAX)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            fabiankosmale Fabian Kosmale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes