mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-07 08:36:02 -10:00
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.