From: Enrico Forestieri Date: Mon, 15 Aug 2016 01:22:01 +0000 (+0200) Subject: Adapt code to comment X-Git-Tag: 2.3.0alpha1~1128 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f323a64fc34b83268b769fe549d1bc5801dd19b3;p=features.git Adapt code to comment --- diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index f3bf437811..e9b1d47202 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -103,13 +103,11 @@ lyx::Converter const * setConverter(string const & from) }); #else // This is also thread-safe according to §6.7.4 of the C++11 standard. - static bool first = true; - if (first) { - first = false; - LYXERR0("PreviewLoader::startLoading()\n" - << "No converter from \"" << from - << "\" format has been defined."); - } + static bool once = ([&]{ + LYXERR0("PreviewLoader::startLoading()\n" + << "No converter from \"" << from + << "\" format has been defined."); + } (), true); #endif return 0; }