mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-18 22:12:26 -05:00
Reduce number of unneeded copies
This patch aims at reducing the number of copies for obejcts that could be referenced rather than copied, because they're not modified during the computation.
This commit is contained in:
parent
a67a574b89
commit
da9afd3f6f
40 changed files with 90 additions and 90 deletions
|
|
@ -176,7 +176,7 @@ namespace {
|
|||
// Try to get the 2nd level domain of the host part of a QUrl. For example,
|
||||
// "foo.bar.example.com" would become "example.com", and "foo.bar.example.co.uk"
|
||||
// would become "example.co.uk".
|
||||
QString getSecondLevelDomain(QUrl url)
|
||||
QString getSecondLevelDomain(const QUrl& url)
|
||||
{
|
||||
QString fqdn = url.host();
|
||||
fqdn.truncate(fqdn.length() - url.topLevelDomain().length());
|
||||
|
|
@ -185,7 +185,7 @@ namespace {
|
|||
return newdom;
|
||||
}
|
||||
|
||||
QUrl convertVariantToUrl(QVariant var)
|
||||
QUrl convertVariantToUrl(const QVariant& var)
|
||||
{
|
||||
QUrl url;
|
||||
if (var.canConvert<QUrl>())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue