From d00402f4b6788a91a17b35b577a358b31d2584f7 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Wed, 8 Jan 2020 19:19:26 +0100 Subject: [PATCH] ~ changing up a few includes --- CMakeLists.txt | 2 +- main/main.cpp | 4 ++-- src/Terminal.cpp | 7 +------ src/{Terminal.h => Terminal.hpp} | 11 +++-------- src/demo.cpp | 2 +- src/{demo.h => demo.hpp} | 0 test/test_demo.cpp | 2 +- 7 files changed, 9 insertions(+), 19 deletions(-) rename src/{Terminal.h => Terminal.hpp} (71%) rename src/{demo.h => demo.hpp} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3026c2f..866891d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_CLANG_TIDY clang-tidy;-header-filter=.;) file(GLOB_RECURSE SOURCES src/*.cpp) -file(GLOB_RECURSE HEADERS src/*.h) +file(GLOB_RECURSE HEADERS src/*.hpp) file(GLOB_RECURSE TESTS test/*.cpp) include_directories(src) include_directories(test) diff --git a/main/main.cpp b/main/main.cpp index 016d5f9..6cea445 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1,8 +1,8 @@ +#include "../src/Terminal.hpp" +#include "internal.hpp" #include "vkvm.hpp" #include #include -#include "internal.hpp" -#include "../src/Terminal.h" int main() { diff --git a/src/Terminal.cpp b/src/Terminal.cpp index b3e4e42..80ef067 100644 --- a/src/Terminal.cpp +++ b/src/Terminal.cpp @@ -1,10 +1,5 @@ -// -// Created by yukun on 29.11.19. -// #include -#include -#include "vkvm.hpp" -#include "Terminal.h" +#include "Terminal.hpp" std::string Terminal::getString() { return s; diff --git a/src/Terminal.h b/src/Terminal.hpp similarity index 71% rename from src/Terminal.h rename to src/Terminal.hpp index 2ef05ae..ac6f6d7 100644 --- a/src/Terminal.h +++ b/src/Terminal.hpp @@ -1,11 +1,6 @@ // -// Created by yukun on 29.11.19. -// - -#ifndef TERMINAL_TERMINAL_H -#define TERMINAL_TERMINAL_H - -#include "vkvm.hpp" +#ifndef TERMINAL_TERMINAL_HPP +#define TERMINAL_TERMINAL_HPP class Terminal { public: @@ -25,4 +20,4 @@ private: int status = 0; char cursor = -127; }; -#endif //TERMINAL_TERMINAL_H +#endif //TERMINAL_TERMINAL_HPP diff --git a/src/demo.cpp b/src/demo.cpp index 1cc01fc..f585ef0 100644 --- a/src/demo.cpp +++ b/src/demo.cpp @@ -1,4 +1,4 @@ -#include "demo.h" +#include "demo.hpp" int test() { return 42; diff --git a/src/demo.h b/src/demo.hpp similarity index 100% rename from src/demo.h rename to src/demo.hpp diff --git a/test/test_demo.cpp b/test/test_demo.cpp index 7cb240e..52ff21f 100644 --- a/test/test_demo.cpp +++ b/test/test_demo.cpp @@ -1,5 +1,5 @@ #include -#include "../src/demo.h" +#include "demo.hpp" TEST_CASE("Demo test") { REQUIRE(test() == 42);