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:
authorDaria Volvenkova <d.volvenkova@corp.mail.ru>2017-05-16 14:42:32 +0300
committerGitHub <noreply@github.com>2017-05-16 14:42:32 +0300
commitd2f79bd2c7004af2d1459e8d5b7748763f241a54 (patch)
tree64300bccb750e59f7c3a05800eafcd5c3b3f89cb /base
parentaa6703383e8d4c2ff8445e8b3c27728846cdab4b (diff)
parent086d6f9cf247cea07cff6bc33d5567dc7c64806b (diff)
Merge pull request #6040 from rokuz/es3-supportbeta-810
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);