summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-30 01:02:56 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-30 01:02:56 +0200
commit885316c4c45f59f64ab1ed1afe5b5f598929644e (patch)
treed8cbba057f6ad89525b6e98527df20e5e42efa25
parenta24bf3db83d81d7d7677a1f0f750f208d32998a8 (diff)
downloadsink-885316c4c45f59f64ab1ed1afe5b5f598929644e.tar.gz
sink-885316c4c45f59f64ab1ed1afe5b5f598929644e.zip
Small optimization
-rw-r--r--common/log.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/log.cpp b/common/log.cpp
index d94536f..5156a23 100644
--- a/common/log.cpp
+++ b/common/log.cpp
@@ -363,6 +363,10 @@ static bool isFiltered(DebugLevel debugLevel, const QByteArray &fullDebugArea)
363 363
364bool Sink::Log::isFiltered(DebugLevel debugLevel, const char *debugArea, const char *debugComponent, const char *file) 364bool Sink::Log::isFiltered(DebugLevel debugLevel, const char *debugArea, const char *debugComponent, const char *file)
365{ 365{
366 //Avoid assembleDebugArea if we can, because it's fairly expensive.
367 if (debugLevel < debugOutputLevel()) {
368 return true;
369 }
366 return isFiltered(debugLevel, assembleDebugArea(debugArea, debugComponent, file).toLatin1()); 370 return isFiltered(debugLevel, assembleDebugArea(debugArea, debugComponent, file).toLatin1());
367} 371}
368 372