Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2017-05-05 12:50:47 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2017-05-14 10:58:00 +0300
commitd18aec9b8bda58817cdfa672b03b613a50f0d239 (patch)
tree20e25cae759f10dbf9b29918b33c6695e188581b /base
parent42efb105af25eccdc3e8739e931cd540872b1fd3 (diff)
Added OpenGL ES3 support
Diffstat (limited to 'base')
-rw-r--r--base/newtype.hpp2
-rw-r--r--base/src_point.cpp9
-rw-r--r--base/src_point.hpp81
3 files changed, 34 insertions, 58 deletions
diff --git a/base/newtype.hpp b/base/newtype.hpp
index f9306c3ae7..f17194e779 100644
--- a/base/newtype.hpp
+++ b/base/newtype.hpp
@@ -146,7 +146,7 @@ namespace newtype_default_output
template <typename Type, typename Tag>
string SimpleDebugPrint(NewType<Type, Tag> const & nt)
{
- return DebugPrint(nt.Get());
+ return ::DebugPrint(nt.Get());
}
} // namespace newtype_default_output
} // namespace my
diff --git a/base/src_point.cpp b/base/src_point.cpp
index 663054f229..4230eed080 100644
--- a/base/src_point.cpp
+++ b/base/src_point.cpp
@@ -3,14 +3,12 @@
#include <algorithm>
#include <sstream>
-
namespace my
{
-
void SrcPoint::TruncateFileName()
{
size_t const maxLen = 10000;
- char const * p[] = { m_fileName, m_fileName };
+ char const * p[] = {m_fileName, m_fileName};
for (size_t i = 0; i < maxLen && m_fileName[i]; ++i)
{
if (m_fileName[i] == '\\' || m_fileName[i] == '/')
@@ -22,9 +20,7 @@ void SrcPoint::TruncateFileName()
m_fileName = p[1];
}
-} // namespace my
-
-std::string DebugPrint(my::SrcPoint const & srcPoint)
+std::string DebugPrint(SrcPoint const & srcPoint)
{
std::ostringstream out;
if (srcPoint.Line() > 0)
@@ -32,3 +28,4 @@ std::string DebugPrint(my::SrcPoint const & srcPoint)
<< srcPoint.Postfix() << " ";
return out.str();
}
+} // namespace my
diff --git a/base/src_point.hpp b/base/src_point.hpp
index 2d46d0af56..4e990cfd73 100644
--- a/base/src_point.hpp
+++ b/base/src_point.hpp
@@ -2,65 +2,44 @@
#include <string>
-
#ifndef SRC_LOGGING
- #define SRC_LOGGING 1
+#define SRC_LOGGING 1
#endif
#if SRC_LOGGING
- #ifndef __OBJC__
- #define SRC() my::SrcPoint(__FILE__, __LINE__, __FUNCTION__, "()")
- #else
- #define SRC() my::SrcPoint(__FILE__, __LINE__, __FUNCTION__)
- #endif
+#ifndef __OBJC__
+#define SRC() my::SrcPoint(__FILE__, __LINE__, __FUNCTION__, "()")
+#else
+#define SRC() my::SrcPoint(__FILE__, __LINE__, __FUNCTION__)
+#endif
#else
- #define SRC() my::SrcPoint()
+#define SRC() my::SrcPoint()
#endif
namespace my
{
- class SrcPoint
+class SrcPoint
+{
+public:
+ SrcPoint() : m_fileName(""), m_line(-1), m_function(""), m_postfix("") { TruncateFileName(); }
+ SrcPoint(char const * fileName, int line, char const * function, char const * postfix = "")
+ : m_fileName(fileName), m_line(line), m_function(function), m_postfix(postfix)
{
- public:
- SrcPoint() : m_fileName(""), m_line(-1), m_function(""), m_postfix("")
- {
- TruncateFileName();
- }
-
- SrcPoint(char const * fileName, int line, char const * function, char const * postfix = "")
- : m_fileName(fileName), m_line(line), m_function(function), m_postfix(postfix)
- {
- TruncateFileName();
- }
-
- inline char const * FileName() const
- {
- return m_fileName;
- }
-
- inline int Line() const
- {
- return m_line;
- }
-
- inline char const * Function() const
- {
- return m_function;
- }
-
- inline char const * Postfix() const
- {
- return m_postfix;
- }
-
- private:
- void TruncateFileName();
-
- char const * m_fileName;
- int m_line;
- char const * m_function;
- char const * m_postfix;
- };
+ TruncateFileName();
+ }
+
+ inline char const * FileName() const { return m_fileName; }
+ inline int Line() const { return m_line; }
+ inline char const * Function() const { return m_function; }
+ inline char const * Postfix() const { return m_postfix; }
+private:
+ void TruncateFileName();
+
+ char const * m_fileName;
+ int m_line;
+ char const * m_function;
+ char const * m_postfix;
+};
+
+std::string DebugPrint(SrcPoint const & srcPoint);
}
-
-std::string DebugPrint(my::SrcPoint const & srcPoint);