From af873dd691d10e2e5b18eaaa958be5d68a0aa67e Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Sun, 25 Sep 2011 20:41:17 +0300 Subject: Renamed debug_print to DebugPrint --- base/buffer_vector.hpp | 2 +- base/internal/message.cpp | 2 +- base/internal/message.hpp | 52 +++++++++++++++++++-------------------- base/src_point.hpp | 2 +- coding/coding_tests/trie_test.cpp | 4 +-- generator/feature_builder.cpp | 8 +++--- generator/feature_builder.hpp | 2 +- geometry/cellid.hpp | 2 +- geometry/point2d.hpp | 2 +- geometry/rect2d.hpp | 2 +- geometry/region2d.hpp | 6 ++--- indexer/feature.cpp | 6 ++--- indexer/feature_data.cpp | 6 ++--- indexer/feature_data.hpp | 2 +- 14 files changed, 49 insertions(+), 49 deletions(-) diff --git a/base/buffer_vector.hpp b/base/buffer_vector.hpp index 8d2685bac9..37de63efed 100644 --- a/base/buffer_vector.hpp +++ b/base/buffer_vector.hpp @@ -236,7 +236,7 @@ void swap(buffer_vector & r1, buffer_vector & r2) } template -inline string debug_print(buffer_vector const & v) +inline string DebugPrint(buffer_vector const & v) { return ::my::impl::DebugPrintSequence(v.data(), v.data() + v.size()); } diff --git a/base/internal/message.cpp b/base/internal/message.cpp index 814eb235c8..7e91e1030c 100644 --- a/base/internal/message.cpp +++ b/base/internal/message.cpp @@ -1,6 +1,6 @@ #include "message.hpp" -string debug_print(string const & t) +string DebugPrint(string const & t) { string res; res.push_back('\''); diff --git a/base/internal/message.hpp b/base/internal/message.hpp index e602f8d373..9b3122fcd9 100644 --- a/base/internal/message.hpp +++ b/base/internal/message.hpp @@ -12,44 +12,44 @@ /// @name Declarations. //@{ -template inline string debug_print(T const & t); +template inline string DebugPrint(T const & t); -string debug_print(string const & t); -inline string debug_print(char const * t); -inline string debug_print(char t); +string DebugPrint(string const & t); +inline string DebugPrint(char const * t); +inline string DebugPrint(char t); -template inline string debug_print(pair const & p); -template inline string debug_print(list const & v); -template inline string debug_print(vector const & v); -template inline string debug_print(set const & v); -template inline string debug_print(map const & v); +template inline string DebugPrint(pair const & p); +template inline string DebugPrint(list const & v); +template inline string DebugPrint(vector const & v); +template inline string DebugPrint(set const & v); +template inline string DebugPrint(map const & v); //@} -inline string debug_print(char const * t) +inline string DebugPrint(char const * t) { - return debug_print(string(t)); + return DebugPrint(string(t)); } -inline string debug_print(char t) +inline string DebugPrint(char t) { - return debug_print(string(1, t)); + return DebugPrint(string(1, t)); } -inline string debug_print(signed char t) +inline string DebugPrint(signed char t) { - return debug_print(static_cast(t)); + return DebugPrint(static_cast(t)); } -inline string debug_print(unsigned char t) +inline string DebugPrint(unsigned char t) { - return debug_print(static_cast(t)); + return DebugPrint(static_cast(t)); } -template inline string debug_print(pair const & p) +template inline string DebugPrint(pair const & p) { ostringstream out; - out << "(" << debug_print(p.first) << ", " << debug_print(p.second) << ")"; + out << "(" << DebugPrint(p.first) << ", " << DebugPrint(p.second) << ")"; return out.str(); } @@ -62,34 +62,34 @@ namespace my ostringstream out; out << "[" << distance(beg, end) << ":"; for (; beg != end; ++beg) - out << " " << debug_print(*beg); + out << " " << DebugPrint(*beg); out << " ]"; return out.str(); } } } -template inline string debug_print(vector const & v) +template inline string DebugPrint(vector const & v) { return ::my::impl::DebugPrintSequence(v.begin(), v.end()); } -template inline string debug_print(list const & v) +template inline string DebugPrint(list const & v) { return ::my::impl::DebugPrintSequence(v.begin(), v.end()); } -template inline string debug_print(set const & v) +template inline string DebugPrint(set const & v) { return ::my::impl::DebugPrintSequence(v.begin(), v.end()); } -template inline string debug_print(map const & v) +template inline string DebugPrint(map const & v) { return ::my::impl::DebugPrintSequence(v.begin(), v.end()); } -template inline string debug_print(T const & t) +template inline string DebugPrint(T const & t) { ostringstream out; out << t; @@ -115,7 +115,7 @@ namespace my template string Message(T1 const & t1) { - return debug_print(t1); + return DebugPrint(t1); } template string Message(T1 const & t1, T2 const & t2) diff --git a/base/src_point.hpp b/base/src_point.hpp index 378638246a..102e796d89 100644 --- a/base/src_point.hpp +++ b/base/src_point.hpp @@ -66,7 +66,7 @@ namespace my }; } -inline string debug_print(my::SrcPoint const & srcPoint) +inline string DebugPrint(my::SrcPoint const & srcPoint) { ostringstream out; out << srcPoint.FileName() << ":" << srcPoint.Line() << " " << srcPoint.Function() << "()"; diff --git a/coding/coding_tests/trie_test.cpp b/coding/coding_tests/trie_test.cpp index 00db870f91..2b1c2c7b33 100644 --- a/coding/coding_tests/trie_test.cpp +++ b/coding/coding_tests/trie_test.cpp @@ -61,9 +61,9 @@ struct KeyValuePair } }; -string debug_print(KeyValuePair const & p) +string DebugPrint(KeyValuePair const & p) { - string keyS = ::debug_print(p.m_key); + string keyS = ::DebugPrint(p.m_key); ostringstream out; out << "KVP(" << keyS << ", " << p.m_value << ")"; return out.str(); diff --git a/generator/feature_builder.cpp b/generator/feature_builder.cpp index f3c0f1c3c2..e28187c8a6 100644 --- a/generator/feature_builder.cpp +++ b/generator/feature_builder.cpp @@ -337,7 +337,7 @@ int FeatureBuilder1::GetMinFeatureDrawScale() const return (minScale == -1 ? 1000 : minScale); } -string debug_print(FeatureBuilder1 const & f) +string DebugPrint(FeatureBuilder1 const & f) { ostringstream out; for (size_t i = 0; i < f.m_osmIds.size(); ++i) @@ -353,9 +353,9 @@ string debug_print(FeatureBuilder1 const & f) } return (out.str() + " " + - debug_print(f.m_LimitRect) + " " + - debug_print(f.m_Params) - //+ " " + debug_print(f.m_Polygons) + DebugPrint(f.m_LimitRect) + " " + + DebugPrint(f.m_Params) + //+ " " + DebugPrint(f.m_Polygons) ); } diff --git a/generator/feature_builder.hpp b/generator/feature_builder.hpp index 019c1268c4..1995b617b2 100644 --- a/generator/feature_builder.hpp +++ b/generator/feature_builder.hpp @@ -15,7 +15,7 @@ namespace serial { class CodingParams; } class FeatureBuilder1 { /// For debugging - friend string debug_print(FeatureBuilder1 const & f); + friend string DebugPrint(FeatureBuilder1 const & f); public: FeatureBuilder1(); diff --git a/geometry/cellid.hpp b/geometry/cellid.hpp index ea1df53b5f..b58afb5422 100644 --- a/geometry/cellid.hpp +++ b/geometry/cellid.hpp @@ -307,7 +307,7 @@ private: int m_Level; }; -template string debug_print(CellId const & id) +template string DebugPrint(CellId const & id) { ostringstream out; out << "CellId<" << DEPTH_LEVELS << ">(\"" << id.ToString().c_str() << "\")"; diff --git a/geometry/point2d.hpp b/geometry/point2d.hpp index eaaf52dec8..07809be8a3 100644 --- a/geometry/point2d.hpp +++ b/geometry/point2d.hpp @@ -251,7 +251,7 @@ namespace m2 } } - template string debug_print(m2::Point const & p) + template string DebugPrint(m2::Point const & p) { ostringstream out; out.precision(20); diff --git a/geometry/rect2d.hpp b/geometry/rect2d.hpp index da423056cc..650ac9df84 100644 --- a/geometry/rect2d.hpp +++ b/geometry/rect2d.hpp @@ -344,7 +344,7 @@ namespace m2 typedef Rect RectI; template - inline string debug_print(m2::Rect const & r) + inline string DebugPrint(m2::Rect const & r) { ostringstream out; out.precision(20); diff --git a/geometry/region2d.hpp b/geometry/region2d.hpp index fd8c8348d5..6e29fb75ca 100644 --- a/geometry/region2d.hpp +++ b/geometry/region2d.hpp @@ -194,7 +194,7 @@ namespace m2 ContainerT m_points; m2::Rect m_rect; - template friend string debug_print(Region const &); + template friend string DebugPrint(Region const &); }; template @@ -214,9 +214,9 @@ namespace m2 } template - inline string debug_print(Region const & r) + inline string DebugPrint(Region const & r) { - return (debug_print(r.m_rect) + ::debug_print(r.m_points)); + return (DebugPrint(r.m_rect) + ::DebugPrint(r.m_points)); } typedef Region RegionD; diff --git a/indexer/feature.cpp b/indexer/feature.cpp index 51cc9df4ba..5cc0efa090 100644 --- a/indexer/feature.cpp +++ b/indexer/feature.cpp @@ -67,12 +67,12 @@ string FeatureBase::DebugString() const string res("FEATURE: "); for (size_t i = 0; i < GetTypesCount(); ++i) - res += "Type:" + debug_print(m_Types[i]) + " "; + res += "Type:" + DebugPrint(m_Types[i]) + " "; res += m_Params.DebugString(); if (GetFeatureType() == GEOM_POINT) - res += "Center:" + debug_print(m_Center) + " "; + res += "Center:" + DebugPrint(m_Center) + " "; return res; } @@ -136,7 +136,7 @@ namespace void Points2String(string & s, TCont const & points) { for (size_t i = 0; i < points.size(); ++i) - s += debug_print(points[i]) + " "; + s += DebugPrint(points[i]) + " "; } } diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp index 26da481e22..10eaf2e1d5 100644 --- a/indexer/feature_data.cpp +++ b/indexer/feature_data.cpp @@ -31,8 +31,8 @@ string FeatureParamsBase::DebugString() const string utf8name; name.GetString(0, utf8name); - return ("'" + utf8name + "' Layer:" + debug_print(layer) + - (rank != 0 ? " Rank:" + debug_print(rank) : "") + + return ("'" + utf8name + "' Layer:" + DebugPrint(layer) + + (rank != 0 ? " Rank:" + DebugPrint(rank) : "") + (!house.IsEmpty() ? " House:" + house.Get() : "") + (!ref.empty() ? " Ref:" + ref : "") + " "); } @@ -144,7 +144,7 @@ uint8_t FeatureParams::GetHeader() const return header; } -string debug_print(FeatureParams const & p) +string DebugPrint(FeatureParams const & p) { ostringstream out; diff --git a/indexer/feature_data.hpp b/indexer/feature_data.hpp index 861f095e0b..a892d027c8 100644 --- a/indexer/feature_data.hpp +++ b/indexer/feature_data.hpp @@ -211,4 +211,4 @@ public: } }; -string debug_print(FeatureParams const & p); +string DebugPrint(FeatureParams const & p); -- cgit v1.2.3