diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-08 05:05:52 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-08 05:05:52 +0300 |
commit | 134e9a07773fd52fc575c81b1a5ef3cd24eb35cd (patch) | |
tree | d0976ad9e3f629ab288a8dd99412ed497e4105e0 /server/main/settings.hpp | |
parent | fix CMakeLists.txt for Visual Studio 2019 (diff) | |
download | math-server-134e9a07773fd52fc575c81b1a5ef3cd24eb35cd.tar.gz math-server-134e9a07773fd52fc575c81b1a5ef3cd24eb35cd.zip |
server: proper integer types
So that VS 2019 doesn't complain.
Diffstat (limited to '')
-rw-r--r-- | server/main/settings.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/main/settings.hpp b/server/main/settings.hpp index 310163f..5a1e375 100644 --- a/server/main/settings.hpp +++ b/server/main/settings.hpp @@ -3,6 +3,8 @@ #include <boost/filesystem.hpp> #include <boost/program_options.hpp> +#include <cstddef> + #include <exception> #include <iostream> #include <string> @@ -12,12 +14,12 @@ namespace math::server { struct Settings { - static constexpr unsigned DEFAULT_PORT = 18000; + static constexpr unsigned short DEFAULT_PORT = 18000; - static unsigned default_threads() { return std::thread::hardware_concurrency(); } + static std::size_t default_threads() { return std::thread::hardware_concurrency(); } - unsigned m_port; - unsigned m_threads; + unsigned short m_port; + std::size_t m_threads; bool exit_with_usage() const { return m_vm.count("help"); } |