From 3f367936a28b109cd9489d5259778e05341681ab Mon Sep 17 00:00:00 2001 From: Jules Fouchy Date: Wed, 31 Jul 2024 17:51:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20[CommandLineArgs]=20Moved=20to?= =?UTF-8?q?=20Cool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cool | 2 +- src/CommandLineArgs/CommandLineArgs.cpp | 13 ------------- src/CommandLineArgs/CommandLineArgs.h | 20 -------------------- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 src/CommandLineArgs/CommandLineArgs.cpp delete mode 100644 src/CommandLineArgs/CommandLineArgs.h diff --git a/Cool b/Cool index afb3bfa45..17fb02b1c 160000 --- a/Cool +++ b/Cool @@ -1 +1 @@ -Subproject commit afb3bfa452f3915ca6a43f1248cd50ab894c249e +Subproject commit 17fb02b1c3e6d84f5ad293cb0434c408de9d438a diff --git a/src/CommandLineArgs/CommandLineArgs.cpp b/src/CommandLineArgs/CommandLineArgs.cpp deleted file mode 100644 index 77fc742ab..000000000 --- a/src/CommandLineArgs/CommandLineArgs.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "CommandLineArgs.h" - -namespace Lab { - -void CommandLineArgs::init(int argc, char** argv) -{ - for (int i = 1; i < argc; ++i) // Skip the first argument, since we don't care about the path of the Coollab executable. - { - _args.emplace_back(argv[i]); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) - } -} - -} // namespace Lab \ No newline at end of file diff --git a/src/CommandLineArgs/CommandLineArgs.h b/src/CommandLineArgs/CommandLineArgs.h deleted file mode 100644 index 5682d60df..000000000 --- a/src/CommandLineArgs/CommandLineArgs.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -namespace Lab { - -class CommandLineArgs { -public: - [[nodiscard]] auto get() const -> auto const& { return _args; } - void init(int argc, char** argv); - -private: - std::vector _args{}; -}; - -inline auto command_line_args() -> CommandLineArgs& -{ - static auto instance = CommandLineArgs{}; - return instance; -} - -} // namespace Lab \ No newline at end of file