diff options
author | Alexander Zaitsev <zamazan4ik@tut.by> | 2020-03-13 03:46:58 +0300 |
---|---|---|
committer | Alexander Zaitsev <zamazan4ik@tut.by> | 2020-03-13 03:46:58 +0300 |
commit | 806e7e5a3edf4fdf2b9c48469a7bc23307b200b0 (patch) | |
tree | cb73c1bd3d8a2cfaba3809b6a6f7fb134732118a /src/net/HttpParser.cpp | |
parent | d1c6a8062577f5ce58105afff2d0a1887bfff957 (diff) |
fix: use C++ fixed-width types instead of C types
- C++ standard doesn't guarantee that C-types without std namespace are available in global namespace. So the proper solution (since it's C++ library) is using C++ types instead of C
Tested:
- Local build
- By unit-tests
Diffstat (limited to 'src/net/HttpParser.cpp')
-rw-r--r-- | src/net/HttpParser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net/HttpParser.cpp b/src/net/HttpParser.cpp index b83ddf0..386a4d9 100644 --- a/src/net/HttpParser.cpp +++ b/src/net/HttpParser.cpp @@ -1,5 +1,7 @@ #include "tgbot/net/HttpParser.h" +#include <cstdint> + #include <boost/algorithm/string.hpp> #include "tgbot/tools/StringTools.h" @@ -78,7 +80,7 @@ string HttpParser::generateMultipartFormData(const vector<HttpReqArg>& args, con string HttpParser::generateMultipartBoundary(const vector<HttpReqArg>& args) const { string result; - srand((uint32_t) time(nullptr)); + srand((std::uint32_t) time(nullptr)); for (const HttpReqArg& item : args) { if (item.isFile) { while (result.empty() || item.value.find(result) != string::npos) { |