Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mleleszi committed Jun 8, 2024
1 parent c240538 commit a88b93b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_executable(cpp_redis main.cpp
redis_type.h
parse.h
protocol.h
controller.cpp
controller.h
tcp_server.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <iostream>

#include "controller.h"
#include "parse.h"
#include "protocol.h"
#include "redis_type.h"


Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/tcp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "spdlog/spdlog.h"

#include "controller.h"
#include "parse.h"
#include "protocol.h"
#include "tcp_server.h"

TCPServer::TCPServer(const Controller &controller) : controller{controller} {
Expand Down Expand Up @@ -43,7 +43,7 @@ TCPServer::TCPServer(const Controller &controller) : controller{controller} {
while (true) {
struct sockaddr_in client_addr = {};
socklen_t socklen = sizeof(client_addr);

int connFD = accept(m_serverFD, (struct sockaddr *) &client_addr, &socklen);

if (connFD < 0) {
Expand Down
2 changes: 1 addition & 1 deletion tests/controller_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "controller.h"
#include "parse.h"
#include "protocol.h"
#include "redis_type.h"
#include "gtest/gtest.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/parse_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "parse.h"
#include "protocol.h"
#include "gtest/gtest.h"

TEST(ParseTests, ParseSimpleString) {
Expand Down

0 comments on commit a88b93b

Please sign in to comment.