fixed LOG macros for "natural" use in "if" expressions.

This commit is contained in:
rachytski 2011-03-08 01:03:31 +02:00 committed by Alex Zolotarev
parent b4584b1b31
commit 8c5dcd829f
2 changed files with 3 additions and 3 deletions

View file

@ -31,8 +31,8 @@ using ::my::LCRITICAL;
// Logging macro.
// Example usage: LOG(LINFO, (Calc(), m_Var, "Some string constant"));
#define LOG(level, msg) if (level < ::my::g_LogLevel) {} \
else { ::my::LogMessage(level, SRC(), ::my::impl::Message msg); }
else do { ::my::LogMessage(level, SRC(), ::my::impl::Message msg); } while (false)
// Logging macro with short info (without entry point)
#define LOG_SHORT(level, msg) if (level < ::my::g_LogLevel) {} \
else { ::my::LogMessage(level, my::SrcPoint(), ::my::impl::Message msg); }
else do { ::my::LogMessage(level, my::SrcPoint(), ::my::impl::Message msg); } while (false)

View file

@ -150,7 +150,7 @@ inline void IndexScales(FeaturesVectorT const & featuresVector,
VarSerialVectorWriter<WriterT> recordWriter(writer, ScaleIndexBase::NUM_BUCKETS);
for (uint32_t bucket = 0; bucket < ScaleIndexBase::NUM_BUCKETS; ++bucket)
{
LOG(LINFO, ("Building scale index for bucket:", bucket))
LOG(LINFO, ("Building scale index for bucket:", bucket));
uint32_t numFeatures = 0;
{
FileWriter cellsToFeaturesWriter(tmpFilePrefix + ".c2f.sorted");