diff options
author | Maksim Andrianov <maksimandrianov1@gmail.com> | 2018-07-20 21:11:10 +0300 |
---|---|---|
committer | Sergey Yershov <syershov@maps.me> | 2018-08-02 11:35:45 +0300 |
commit | 61fd4acdb53e63d715cd641b08ffa67fe5e249ed (patch) | |
tree | 06ba18a3c8cd4dab130dd07a9b658ed35b27caaa /base | |
parent | c0e546812efed884e1186db377b2307017bc95f7 (diff) |
[generator] Changed logic for building mwm for regions
Diffstat (limited to 'base')
-rw-r--r-- | base/CMakeLists.txt | 1 | ||||
-rw-r--r-- | base/utils.hpp | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 00fec2ab05..232c400cd6 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -93,6 +93,7 @@ set( uni_string_dfa.hpp url_helpers.cpp url_helpers.hpp + utils.hpp visitor.hpp worker_thread.cpp worker_thread.hpp diff --git a/base/utils.hpp b/base/utils.hpp new file mode 100644 index 0000000000..d1e127b8e9 --- /dev/null +++ b/base/utils.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include <limits> + +template<class T, class V> +inline bool TestOverflow(V value) +{ + return value >= std::numeric_limits<T>::min() && value <= std::numeric_limits<T>::max(); +} |