Skip to content

Commit

Permalink
fix: cannot resolve includes globally
Browse files Browse the repository at this point in the history
  • Loading branch information
SunPodder committed Jun 25, 2023
1 parent 5cd230c commit fe0d871
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/http/error.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#ifndef ERROR_HPP
#define ERROR_HPP
#include "method.hpp"
#include <exception>
#include <http/method.hpp>
#include <iosfwd>
#include <string>

Expand Down
6 changes: 3 additions & 3 deletions src/http/request.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef REQUEST_H
#define REQUEST_H
#include <http/method.hpp>
#include "../json/json.hpp"
#include "../utils/string-map.hpp"
#include "method.hpp"
#include <iostream>
#include <json/json.hpp>
#include <utils/string-map.hpp>

class HTTPRequest;

Expand Down
2 changes: 1 addition & 1 deletion src/http/response.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef RESPONSE_H
#define RESPONSE_H
#include "../utils/string-map.hpp"
#include <iostream>
#include <utils/string-map.hpp>

class HTTPResponse {
private:
Expand Down
2 changes: 1 addition & 1 deletion src/http/route.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef ROUTE_H
#define ROUTE_H
#include <http/method.hpp>
#include "method.hpp"
#include <iostream>
class HTTPRequest;
class HTTPResponse;
Expand Down
8 changes: 4 additions & 4 deletions src/http/server.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef SERVER_H
#define SERVER_H
#include <http/method.hpp>
#include "../utils/route-map.hpp"
#include "../utils/shared-queue.hpp"
#include "../utils/string-map.hpp"
#include "method.hpp"
#include <iostream>
#include <utils/route-map.hpp>
#include <utils/shared-queue.hpp>
#include <utils/string-map.hpp>
class HTTPRequest;
class HTTPResponse;
class Socket;
Expand Down
2 changes: 1 addition & 1 deletion src/http/utils.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef INTERNAL_HPP
#define INTERNAL_HPP
#include <http/method.hpp>
#include "method.hpp"
#include <iosfwd>

std::string getHTTPStatusFromCode(int code);
Expand Down
2 changes: 1 addition & 1 deletion src/json/json.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef JSON_HPP
#define JSON_HPP
#include <json/json_impl.hpp>
#include "json_impl.hpp"
using JSON = nlohmann::json;
#endif
4 changes: 1 addition & 3 deletions src/logger/logger.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#ifndef LOGGER_HPP
#define LOGGER_HPP
#include "utils/utils.hpp"
#include <ctime>
#include "../utils/utils.hpp"
#include <iostream>
#include <string>
#include <type_traits>
#include <utility>

class Logger {
private:
Expand Down
2 changes: 1 addition & 1 deletion src/templates/inja.hpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define INCLUDE_INJA_INJA_HPP_

-#include <nlohmann/json.hpp>
+#include <json/json_impl.hpp>
+#include "../json/json_impl.hpp"

namespace inja {
#ifndef INJA_DATA_TYPE
4 changes: 2 additions & 2 deletions src/templates/jinja.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef JINJA_HPP
#define JINJA_HPP
#include <iosfwd>
#include <json/json.hpp>
#include <templates/inja.hpp>
#include "../json/json.hpp"
#include "inja.hpp"

namespace Template {
class Jinja {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/route-map.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef ROUTE_MAP_H
#define ROUTE_MAP_H
#include <http/route.hpp>
#include <iosfwd>
#include <unordered_map>

class Route;
typedef std::unordered_map<std::string, Route> RouteMap;
#endif

0 comments on commit fe0d871

Please sign in to comment.