aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server/main/settings.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-08 05:05:52 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-08 05:05:52 +0300
commit134e9a07773fd52fc575c81b1a5ef3cd24eb35cd (patch)
treed0976ad9e3f629ab288a8dd99412ed497e4105e0 /server/main/settings.hpp
parentfix CMakeLists.txt for Visual Studio 2019 (diff)
downloadmath-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.hpp10
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"); }