summaryrefslogtreecommitdiff
path: root/include/tgbot/net
diff options
context:
space:
mode:
authorAlexander Zaitsev <zamazan4ik@tut.by>2020-03-13 03:56:35 +0300
committerAlexander Zaitsev <zamazan4ik@tut.by>2020-03-13 03:56:35 +0300
commit26fac5bf7e87dd5704a967ee4c744228b93d20b7 (patch)
tree74e5daa9a58f3a97b417925a212ac2cd31487a5e /include/tgbot/net
parent806e7e5a3edf4fdf2b9c48469a7bc23307b200b0 (diff)
fix: use std::size_t instead of size_t
- use C++ size_t from std namespace instead of a version from global namespace Tested: - Local build - Unit-tests
Diffstat (limited to 'include/tgbot/net')
-rw-r--r--include/tgbot/net/HttpServer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/tgbot/net/HttpServer.h b/include/tgbot/net/HttpServer.h
index 28ea5a3..ccee077 100644
--- a/include/tgbot/net/HttpServer.h
+++ b/include/tgbot/net/HttpServer.h
@@ -1,6 +1,7 @@
#ifndef TGBOT_HTTPSERVER_H
#define TGBOT_HTTPSERVER_H
+#include <cstddef>
#include <iostream>
#include <string>
#include <utility>
@@ -73,7 +74,7 @@ protected:
_socket,
*data,
"\r\n\r\n",
- [self, data](const boost::system::error_code& e, size_t n) {
+ [self, data](const boost::system::error_code& e, std::size_t n) {
if (e) {
std::cout << "error in HttpServer::Connection#_readHeader: " << e << std::endl;
return;
@@ -97,7 +98,7 @@ protected:
boost::asio::async_write(
self->_socket,
boost::asio::buffer(answer),
- [](const boost::system::error_code& e, size_t n) { });
+ [](const boost::system::error_code& e, std::size_t n) { });
return;
}
@@ -114,7 +115,7 @@ protected:
boost::asio::async_read(_socket,
*data,
boost::asio::transfer_exactly(size - data->size()),
- [self, data, size, headers](const boost::system::error_code& e, size_t n) {
+ [self, data, size, headers](const boost::system::error_code& e, std::size_t n) {
if (e) {
std::cout << "error in HttpServer::Connection#_readBody: " << e << std::endl;
return;
@@ -133,7 +134,7 @@ protected:
boost::asio::async_write(
self->_socket,
boost::asio::buffer(answer),
- [](const boost::system::error_code& e, size_t n) { });
+ [](const boost::system::error_code& e, std::size_t n) { });
self->_socket.close();
});