[vlmc-devel] VlmcLogger: Use const reference if possible
Yikai Lu
git at videolan.org
Sat Jun 10 04:23:22 CEST 2017
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Jun 10 10:56:52 2017 +0900| [6468d17a34b9c4d96f23b35c8e58f21b064702bb] | committer: Yikai Lu
VlmcLogger: Use const reference if possible
> https://code.videolan.org/videolan/vlmc/commit/6468d17a34b9c4d96f23b35c8e58f21b064702bb
---
src/Tools/VlmcLogger.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Tools/VlmcLogger.cpp b/src/Tools/VlmcLogger.cpp
index dc459ffc..e85d7f78 100644
--- a/src/Tools/VlmcLogger.cpp
+++ b/src/Tools/VlmcLogger.cpp
@@ -55,7 +55,7 @@ VlmcLogger::setup()
SettingValue* logLevel = VLMC_CREATE_PREFERENCE( SettingValue::Int, "private/LogLevel", (int)VlmcLogger::Quiet,
"", "", SettingValue::Private | SettingValue::Clamped | SettingValue::Runtime );
logLevel->setLimits((int)Debug, (int)Verbose);
- QStringList args = qApp->arguments();
+ const QStringList& args = qApp->arguments();
if ( args.indexOf( QRegExp( "-vv+" ) ) >= 0 )
m_currentLogLevel = VlmcLogger::Debug;
else if ( args.contains( "-v" ) == true )
@@ -68,8 +68,8 @@ VlmcLogger::setup()
int pos = args.indexOf( QRegExp( "--logfile=.*" ) );
if ( pos > 0 )
{
- QString arg = args[pos];
- QString logFile = arg.mid( 10 );
+ const QString& arg = args[pos];
+ const QString& logFile = arg.mid( 10 );
if ( logFile.length() <= 0 )
vlmcWarning() << tr("Invalid value supplied for argument --logfile" );
else
@@ -81,8 +81,8 @@ VlmcLogger::setup()
pos = args.indexOf( QRegExp( "--backendverbose=.*" ) );
if ( pos > 0 )
{
- QString arg = args[pos];
- QString vlcLogLevelStr = arg.mid( 17 );
+ const QString& arg = args[pos];
+ const QString& vlcLogLevelStr = arg.mid( 17 );
if ( vlcLogLevelStr.length() <= 0 )
vlmcWarning() << tr("Invalid value supplied for argument --backendverbose" );
More information about the Vlmc-devel
mailing list