From 9b48dd50516b60a5058670a6ad51354355a1024b Mon Sep 17 00:00:00 2001 From: rachytski Date: Mon, 28 Feb 2011 20:48:46 +0200 Subject: [PATCH] minor fixes. --- map/information_display.cpp | 5 ++--- yg/area_renderer.cpp | 2 +- yg/geometry_batcher.cpp | 3 ++- yg/path_renderer.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/map/information_display.cpp b/map/information_display.cpp index 3e41263026..85def13f74 100644 --- a/map/information_display.cpp +++ b/map/information_display.cpp @@ -409,6 +409,7 @@ size_t InformationDisplay::s_logSize = 10; my::LogMessageFn InformationDisplay::s_oldLogFn = 0; threads::Mutex s_logMutex; WindowHandle * InformationDisplay::s_windowHandle = 0; +size_t s_msgNum = 0; void InformationDisplay::logMessage(my::LogLevel level, my::SrcPoint const & srcPoint, string const & msg) { @@ -416,13 +417,11 @@ void InformationDisplay::logMessage(my::LogLevel level, my::SrcPoint const & src threads::MutexGuard guard(s_logMutex); ostringstream out; char const * names[] = { "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL" }; - out << "LOG "; + out << s_msgNum++ << ":"; if (level >= 0 && level <= static_cast(ARRAY_SIZE(names))) out << names[level]; else out << level; -// out << " " << srcPoint.FileName() << ":" << srcPoint.Line() << " " << srcPoint.Function() -// << "() " << msg << endl; out << msg << endl; s_log.push_back(out.str()); while (s_log.size() > s_logSize) diff --git a/yg/area_renderer.cpp b/yg/area_renderer.cpp index a010b286f9..ee843f55d8 100644 --- a/yg/area_renderer.cpp +++ b/yg/area_renderer.cpp @@ -27,7 +27,7 @@ namespace yg void AreaRenderer::endFrame() { if (isDebugging()) - LOG(LINFO, ("Drawing ", m_areasCount, " areas, ", m_trianglesCount, " triangles total")); + LOG(LINFO, ("drawing ", m_areasCount, " areas, ", m_trianglesCount, " triangles total")); base_t::endFrame(); } diff --git a/yg/geometry_batcher.cpp b/yg/geometry_batcher.cpp index aaabfcf45c..8378db60e2 100644 --- a/yg/geometry_batcher.cpp +++ b/yg/geometry_batcher.cpp @@ -136,7 +136,8 @@ namespace yg if (isDebugging()) { for (size_t i = 0; i < m_pipelines.size(); ++i) - LOG(LINFO, ("pipeline #", i, " vertices=", m_pipelines[i].m_verticesDrawn, ", triangles=", m_pipelines[i].m_indicesDrawn / 3)); + if ((m_pipelines[i].m_verticesDrawn != 0) || (m_pipelines[i].m_indicesDrawn != 0)) + LOG(LINFO, ("pipeline #", i, " vertices=", m_pipelines[i].m_verticesDrawn, ", triangles=", m_pipelines[i].m_indicesDrawn / 3)); } base_t::endFrame(); diff --git a/yg/path_renderer.cpp b/yg/path_renderer.cpp index 1164a50578..8440f1c868 100644 --- a/yg/path_renderer.cpp +++ b/yg/path_renderer.cpp @@ -259,7 +259,7 @@ namespace yg void PathRenderer::endFrame() { if (isDebugging()) - LOG(LINFO, ("Drawing ", m_pathCount, " pathes, ", m_pointsCount, " points total")); + LOG(LINFO, ("drawing ", m_pathCount, " pathes, ", m_pointsCount, " points total")); base_t::endFrame(); }