refactor: update includes to use cstdint and cstddef for consistency
This commit is contained in:
parent
93079cd8bd
commit
b145a6eef2
@ -8,7 +8,7 @@
|
|||||||
#include <map> // for map
|
#include <map> // for map
|
||||||
#include <utility> // for pair, move
|
#include <utility> // for pair, move
|
||||||
|
|
||||||
#include <stdint.h> // for uint8_t
|
#include <cstdint> // for uint8_t
|
||||||
#include <sys/types.h> // for ssize_t
|
#include <sys/types.h> // for ssize_t
|
||||||
|
|
||||||
Client::Client(std::unique_ptr<Socket> socket, Server &server, const ServerConfig &server_config)
|
Client::Client(std::unique_ptr<Socket> socket, Server &server, const ServerConfig &server_config)
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
#include <memory> // for unique_ptr
|
#include <memory> // for unique_ptr
|
||||||
#include <string> // for string
|
#include <string> // for string
|
||||||
|
|
||||||
#include <stddef.h> // for size_t
|
#include <cstddef> // for size_t
|
||||||
|
|
||||||
class Server;
|
class Server;
|
||||||
class Socket;
|
class Socket;
|
||||||
|
|||||||
@ -3,12 +3,11 @@
|
|||||||
#include <webserv/config/utils.hpp> // for trim, findCorrespondingClosingBrace, trimSemi
|
#include <webserv/config/utils.hpp> // for trim, findCorrespondingClosingBrace, trimSemi
|
||||||
#include <webserv/log/Log.hpp> // for Log
|
#include <webserv/log/Log.hpp> // for Log
|
||||||
|
|
||||||
|
#include <cstddef> // for size_t
|
||||||
#include <fstream> // for basic_ifstream, basic_istream, basic_filebuf, basic_ostream::operator<<, ifstream, istringstream, stringstream
|
#include <fstream> // for basic_ifstream, basic_istream, basic_filebuf, basic_ostream::operator<<, ifstream, istringstream, stringstream
|
||||||
#include <sstream> // for basic_stringstream, basic_istringstream
|
#include <sstream> // for basic_stringstream, basic_istringstream
|
||||||
#include <stdexcept> // for runtime_error
|
#include <stdexcept> // for runtime_error
|
||||||
|
|
||||||
#include <stddef.h> // for size_t
|
|
||||||
|
|
||||||
ConfigManager::ConfigManager() : initialized_(false) {}
|
ConfigManager::ConfigManager() : initialized_(false) {}
|
||||||
|
|
||||||
ConfigManager::~ConfigManager() {}
|
ConfigManager::~ConfigManager() {}
|
||||||
|
|||||||
@ -3,13 +3,12 @@
|
|||||||
#include <webserv/config/utils.hpp> // for findCorrespondingClosingBrace, trim
|
#include <webserv/config/utils.hpp> // for findCorrespondingClosingBrace, trim
|
||||||
#include <webserv/log/Log.hpp> // for Log, LOCATION
|
#include <webserv/log/Log.hpp> // for Log, LOCATION
|
||||||
|
|
||||||
|
#include <cstddef> // for size_t
|
||||||
#include <sstream> // for basic_istringstream, basic_istream, istringstream
|
#include <sstream> // for basic_istringstream, basic_istream, istringstream
|
||||||
#include <stdexcept> // for runtime_error
|
#include <stdexcept> // for runtime_error
|
||||||
#include <string> // for basic_string, char_traits, operator+, allocator, string, operator==, operator>>, operator<=>, to_string, stoi, getline
|
#include <string> // for basic_string, char_traits, operator+, allocator, string, operator==, operator>>, operator<=>, to_string, stoi, getline
|
||||||
#include <utility> // for pair
|
#include <utility> // for pair
|
||||||
|
|
||||||
#include <stddef.h> // for size_t
|
|
||||||
|
|
||||||
ServerConfig::ServerConfig(std::string const &serverBlock) : port_(80)
|
ServerConfig::ServerConfig(std::string const &serverBlock) : port_(80)
|
||||||
{
|
{
|
||||||
parseServerBlock(serverBlock);
|
parseServerBlock(serverBlock);
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef> // for size_t
|
||||||
#include <string> // for string
|
#include <string> // for string
|
||||||
|
|
||||||
#include <stddef.h> // for size_t
|
|
||||||
|
|
||||||
namespace utils
|
namespace utils
|
||||||
{
|
{
|
||||||
size_t stoul(const std::string &str, int base = 10);
|
size_t stoul(const std::string &str, int base = 10);
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
#include <algorithm> // for __transform_fn, transform
|
#include <algorithm> // for __transform_fn, transform
|
||||||
#include <utility> // for pair
|
#include <utility> // for pair
|
||||||
|
|
||||||
#include <ctype.h> // for tolower
|
#include <cctype> // for tolower
|
||||||
|
|
||||||
std::optional<size_t> HttpHeaders::getContentLength() const
|
std::optional<size_t> HttpHeaders::getContentLength() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef> // for size_t
|
||||||
#include <optional> // for optional
|
#include <optional> // for optional
|
||||||
#include <string> // for basic_string, string, hash
|
#include <string> // for basic_string, string, hash
|
||||||
#include <unordered_map> // for unordered_map
|
#include <unordered_map> // for unordered_map
|
||||||
|
|
||||||
#include <stddef.h> // for size_t
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file HttpHeaders.hpp
|
* @file HttpHeaders.hpp
|
||||||
* @brief Declaration of the HttpHeaders class for managing HTTP headers.
|
* @brief Declaration of the HttpHeaders class for managing HTTP headers.
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
#include <string_view> // for string_view
|
#include <string_view> // for string_view
|
||||||
#include <unordered_map> // for unordered_map
|
#include <unordered_map> // for unordered_map
|
||||||
|
|
||||||
#include <stdint.h> // for uint8_t
|
#include <cstdint> // for uint8_t
|
||||||
|
|
||||||
class Channel; // Forward declaration
|
class Channel; // Forward declaration
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
#include <utility> // for move, pair
|
#include <utility> // for move, pair
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include <errno.h> // for errno
|
#include <cerrno> // for errno
|
||||||
#include <sys/epoll.h> // for epoll_event, epoll_ctl, EPOLLIN, EPOLLOUT, epoll_create1, epoll_wait, EPOLLERR, EPOLLHUP, EPOLL_CTL_ADD, EPOLL_CTL_DEL, EPOLL_CTL_MOD
|
#include <sys/epoll.h> // for epoll_event, epoll_ctl, EPOLLIN, EPOLLOUT, epoll_create1, epoll_wait, EPOLLERR, EPOLLHUP, EPOLL_CTL_ADD, EPOLL_CTL_DEL, EPOLL_CTL_MOD
|
||||||
#include <sys/socket.h> // for send, SOMAXCONN
|
#include <sys/socket.h> // for send, SOMAXCONN
|
||||||
#include <sys/types.h> // for ssize_t
|
#include <sys/types.h> // for ssize_t
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
#include <unordered_map> // for unordered_map
|
#include <unordered_map> // for unordered_map
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include <stdint.h> // for uint32_t
|
#include <cstdint> // for uint32_t
|
||||||
|
|
||||||
class Client;
|
class Client;
|
||||||
class ConfigManager;
|
class ConfigManager;
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef> // for size_t
|
||||||
#include <memory> // for unique_ptr
|
#include <memory> // for unique_ptr
|
||||||
#include <string> // for string
|
#include <string> // for string
|
||||||
|
|
||||||
#include <stddef.h> // for size_t
|
|
||||||
#include <sys/types.h> // for ssize_t
|
#include <sys/types.h> // for ssize_t
|
||||||
|
|
||||||
class Socket
|
class Socket
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user