diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-04-06 20:02:53 +0300 |
---|---|---|
committer | Sergey Yershov <syershov@maps.me> | 2017-04-19 22:04:09 +0300 |
commit | de1c29b3761c4a91d6b3a4f83b746c7947fb850d (patch) | |
tree | 25348c8442a2630e16239744d9c934d629370d61 /base | |
parent | a51f90985ae6d37c2a9c8397aad1a1bf79beeedd (diff) |
preparation for std migration
Diffstat (limited to 'base')
-rw-r--r-- | base/condition.cpp | 3 | ||||
-rw-r--r-- | base/math.hpp | 10 | ||||
-rw-r--r-- | base/timer.cpp | 3 |
3 files changed, 13 insertions, 3 deletions
diff --git a/base/condition.cpp b/base/condition.cpp index 2be49f0e27..e2a60f0753 100644 --- a/base/condition.cpp +++ b/base/condition.cpp @@ -2,7 +2,6 @@ #include "base/mutex.hpp" #include "std/target_os.hpp" -#include "std/systime.hpp" #include <pthread.h> @@ -10,6 +9,8 @@ #include <cstdint> #include <limits> +#include <sys/time.h> + namespace threads { namespace impl diff --git a/base/math.hpp b/base/math.hpp index c54f74843c..01c31a0c43 100644 --- a/base/math.hpp +++ b/base/math.hpp @@ -11,10 +11,18 @@ #include <boost/integer.hpp> +namespace math +{ + double constexpr pi = 3.14159265358979323846; + double constexpr pi2 = pi / 2.; + double constexpr pi4 = pi / 4.; + double constexpr twicePi = 2. * pi; + + template <class T> T sqr(T t) { return (t*t); } +} namespace my { - template <typename T> inline T Abs(T x) { return (x < 0 ? -x : x); diff --git a/base/timer.cpp b/base/timer.cpp index 706dde5fcb..cf69719581 100644 --- a/base/timer.cpp +++ b/base/timer.cpp @@ -3,7 +3,6 @@ #include "base/timegm.hpp" #include "base/timer.hpp" -#include "std/systime.hpp" #include "std/target_os.hpp" #include <algorithm> @@ -12,6 +11,8 @@ #include <iomanip> #include <sstream> +#include <sys/time.h> + #ifndef OMIM_OS_LINUX using std::get_time; using std::put_time; |