diff --git a/src/edid.cpp b/src/edid.cpp --- a/src/edid.cpp +++ b/src/edid.cpp @@ -406,14 +406,10 @@ QString Edid::Private::edidParseString(const quint8 *data) const { - QString text; - /* this is always 12 bytes, but we can't guarantee it's null * terminated or not junk. */ - text = QString::fromLocal8Bit(reinterpret_cast(data), 12); + auto text = QString::fromLocal8Bit(reinterpret_cast(data), 12); // Remove newlines, extra spaces and stuff - text = text.simplified(); - - return text; + return text.simplified(); }