From a8e1a2d233013f632d8e472c71972940c2f28670 Mon Sep 17 00:00:00 2001 From: Rick van Vonderen <0945444@hr.nl> Date: Mon, 16 Dec 2019 00:32:16 +0100 Subject: [PATCH] Move extern to application, add link to README.org --- CMakeLists.txt | 2 +- README.org | 1 + inferno/src/inferno/application.h | 4 ++-- inferno/src/inferno/entrypoint.h | 2 -- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e3b24a..ef8ac38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ else() message("--- Release ---") set(CMAKE_BUILD_TYPE "Release") - # -O3 = Optimizations that increase compilation time and performance + # -O3 = Optimizations that increases compilation time and performance set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") endif() diff --git a/README.org b/README.org index 8170e75..1e15ae6 100644 --- a/README.org +++ b/README.org @@ -45,4 +45,5 @@ Or * References +- [[https://www.glfw.org/docs/latest/build_guide.html#build_link_cmake_source][Build GLFW using CMake]] - [[https://www.youtube.com/playlist?list=PLlrATfBNZ98dC-V-N3m0Go4deliWHPFwT][Game Engine]] by The Cherno diff --git a/inferno/src/inferno/application.h b/inferno/src/inferno/application.h index 5763189..ff690b4 100644 --- a/inferno/src/inferno/application.h +++ b/inferno/src/inferno/application.h @@ -11,14 +11,14 @@ namespace Inferno { void run(); - inline static Application &get() { return *s_instance; } + static inline Application &get() { return *s_instance; } private: static Application* s_instance; }; // To be defined in the game - Application* createApplication(); + extern Application* createApplication(); } diff --git a/inferno/src/inferno/entrypoint.h b/inferno/src/inferno/entrypoint.h index 9a43408..78982eb 100644 --- a/inferno/src/inferno/entrypoint.h +++ b/inferno/src/inferno/entrypoint.h @@ -10,8 +10,6 @@ #include "inferno/application.h" #include "inferno/log.h" -extern Inferno::Application* Inferno::createApplication(); - int main(int argc, char* argv[]) { // Supress unused warning