Fix CodeChecker warnings
Ensure move where it makes sense, and remove it where it doesnt Change-Id: I988d7ff44f1d7898a967130fa53ed6ec5690e778 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
1c9e155b05
commit
fdb219b68e
@ -25,12 +25,11 @@ QT_BEGIN_NAMESPACE
|
||||
class Q_GUI_EXPORT QColorTrc
|
||||
{
|
||||
public:
|
||||
QColorTrc() noexcept : m_type(Type::Uninitialized)
|
||||
{ }
|
||||
QColorTrc(const QColorTransferFunction &fun) : m_type(Type::Function), m_fun(fun)
|
||||
{ }
|
||||
QColorTrc(const QColorTransferTable &table) : m_type(Type::Table), m_table(table)
|
||||
{ }
|
||||
QColorTrc() noexcept : m_type(Type::Uninitialized) { }
|
||||
QColorTrc(const QColorTransferFunction &fun) : m_type(Type::Function), m_fun(fun) { }
|
||||
QColorTrc(const QColorTransferTable &table) : m_type(Type::Table), m_table(table) { }
|
||||
QColorTrc(QColorTransferFunction &&fun) noexcept : m_type(Type::Function), m_fun(std::move(fun)) { }
|
||||
QColorTrc(QColorTransferTable &&table) noexcept : m_type(Type::Table), m_table(std::move(table)) { }
|
||||
|
||||
enum class Type {
|
||||
Uninitialized,
|
||||
|
@ -549,7 +549,7 @@ static quint32 parseTRC(const QByteArrayView &tagData, QColorTrc &gamma, QColorT
|
||||
static_assert(sizeof(GenericTagData) == 2 * sizeof(quint32_be),
|
||||
"GenericTagData has padding. The following code is a subject to UB.");
|
||||
qFromBigEndian<quint16>(tagData.constData() + valueOffset, curv.valueCount, tabl.data());
|
||||
QColorTransferTable table = QColorTransferTable(curv.valueCount, std::move(tabl), type);
|
||||
QColorTransferTable table(curv.valueCount, tabl, type);
|
||||
QColorTransferFunction curve;
|
||||
if (!table.checkValidity()) {
|
||||
qCWarning(lcIcc) << "Invalid curv table";
|
||||
|
Loading…
x
Reference in New Issue
Block a user