Files
RetroArch/ui
U-DESKTOP-SPFP6AQ\twistedtechre 8f6d51bc80 Qt: return const char* from enum-name lookup methods
Three MainWindow methods exist solely to map an enum value to a
fixed string literal: getThemeString, getCurrentViewTypeString,
and getCurrentThumbnailTypeString. They returned QString built
from a string literal at every call. Returning the literal
directly as const char* is one less heap allocation per call and
the caller (QSettings::setValue, which takes QVariant) accepts
it via the implicit QString conversion either way.

* getThemeString: 4 lines -> 1 line per branch.
* getCurrentViewTypeString: switch over a 2-value enum collapses
  to an if.
* getCurrentThumbnailTypeString: dropped a dead trailing
  'return QString("list")' that the compiler couldn't reach -
  the THUMBNAIL_TYPE_BOXART branch already returned via the
  default label.

No behaviour change. All four object files build with zero
warnings.
2026-05-01 23:00:30 +02:00
..
2025-04-16 15:35:01 +03:00
2025-02-11 10:28:16 +01:00