Bug 1263197 - part 2 - remove temporary variable in nsPresContext's constructor; r=dholbert

In the upcoming patch to disable logging, we're going to conditionally
turn MOZ_LOG_TEST into a constant false.  But for this instance of
MOZ_LOG_TEST in nsPresContext, turning it into a constant means that
|log| becomes unused.  Since |log| isn't used after this point, let's
move the |gfxPlatform::GetLog| call into the MOZ_LOG_TEST call, removing
the temporary variable, and making the compiler happy.
This commit is contained in:
Nathan Froyd 2016-05-06 09:11:17 -04:00
Родитель 08c711b5df
Коммит efbd9a9b65
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -261,8 +261,7 @@ nsPresContext::nsPresContext(nsIDocument* aDocument, nsPresContextType aType)
mCounterStylesDirty = true;
// if text perf logging enabled, init stats struct
LogModule* log = gfxPlatform::GetLog(eGfxLog_textperf);
if (MOZ_LOG_TEST(log, LogLevel::Warning)) {
if (MOZ_LOG_TEST(gfxPlatform::GetLog(eGfxLog_textperf), LogLevel::Warning)) {
mTextPerf = new gfxTextPerfMetrics();
}