From d7f62f4fd4e5e9e6d82514f069d6e53d19125ba6 Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 10 Nov 2024 09:03:35 -0500 Subject: [PATCH] Refactor project header and source files: update includes and restore method declarations for improved organization and clarity --- src/app/core/project.cc | 1 + src/app/core/project.h | 15 ++------------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/app/core/project.cc b/src/app/core/project.cc index 406dd1cd..98051bf2 100644 --- a/src/app/core/project.cc +++ b/src/app/core/project.cc @@ -3,6 +3,7 @@ #include #include +#include "app/core/constants.h" #include "app/gui/icons.h" #include "imgui/imgui.h" #include "imgui/misc/cpp/imgui_stdlib.h" diff --git a/src/app/core/project.h b/src/app/core/project.h index 573de3a8..cfe21019 100644 --- a/src/app/core/project.h +++ b/src/app/core/project.h @@ -8,7 +8,6 @@ #include "absl/status/status.h" #include "app/core/common.h" -#include "app/core/constants.h" #include "app/core/utils/file_util.h" namespace yaze { @@ -27,23 +26,11 @@ constexpr char kEndOfProjectFile[] = "EndOfProjectFile"; * backups. */ struct Project : public core::ExperimentFlags { - /** - * @brief Creates a new project. - * - * @param project_name The name of the project. - * @param project_path The path to the project. - * @return An absl::Status indicating the success or failure of the project - * creation. - */ absl::Status Create(const std::string& project_name) { name = project_name; project_opened_ = true; return absl::OkStatus(); } - - absl::Status Open(const std::string& project_path); - absl::Status Save(); - absl::Status CheckForEmptyFields() { if (name.empty() || filepath.empty() || rom_filename_.empty() || code_folder_.empty() || labels_filename_.empty()) { @@ -54,6 +41,8 @@ struct Project : public core::ExperimentFlags { return absl::OkStatus(); } + absl::Status Open(const std::string &project_path); + absl::Status Save(); bool project_opened_ = false; std::string name;