QPluginParsedMetaData: avoid the indirection through QCborMap
value[x] is the same as value.toMap()[x] but avoids the refcounting up and down just to call the operator[] overload. We're calling the operator[] overload taking an integer, which means it could match an array, but we know the data member won't be one because of how QPluginParsedMetaData::parse() parses. Change-Id: I2cffe62afda945079b63fffd16bd5c690b2bfee4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
ea0e0a8652
commit
a1b2c474fd
@ -90,7 +90,7 @@ public:
|
||||
|
||||
// if data is not a map, toMap() returns empty, so shall these functions
|
||||
QCborMap toCbor() const { return data.toMap(); }
|
||||
QCborValue value(QtPluginMetaDataKeys k) const { return toCbor()[int(k)]; }
|
||||
QCborValue value(QtPluginMetaDataKeys k) const { return data[int(k)]; }
|
||||
};
|
||||
|
||||
class QFactoryLoaderPrivate;
|
||||
|
Loading…
Reference in New Issue
Block a user