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

Use proper types for indices

XMLWordPrintable

      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)

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

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

              Created:
              Updated:

                There are no open Gerrit changes