QCommandLineOption: prevent aggressive inlining
There is a good chance that in every program, command line options that have only one name and those that have multiple names are used. Make better use of the icache by not inlining the Private ctors into the QCommandLineOption ones. Saves 400B in text size on Linux GCC 4.9 C++11 release builds. Change-Id: I6247d4a2330c5fff75d06f5a40223d972b267e85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
90da7ba49c
commit
669487fe95
@ -41,11 +41,13 @@ QT_BEGIN_NAMESPACE
|
||||
class QCommandLineOptionPrivate : public QSharedData
|
||||
{
|
||||
public:
|
||||
Q_NEVER_INLINE
|
||||
explicit QCommandLineOptionPrivate(const QString &name)
|
||||
: names(removeInvalidNames(QStringList(name))),
|
||||
hidden(false)
|
||||
{ }
|
||||
|
||||
Q_NEVER_INLINE
|
||||
explicit QCommandLineOptionPrivate(const QStringList &names)
|
||||
: names(removeInvalidNames(names)),
|
||||
hidden(false)
|
||||
|
Loading…
Reference in New Issue
Block a user