feat: Refactor Shutdown methods to use noexcept and update LoadShaderPathsMap return type

This commit is contained in:
2026-01-04 13:59:12 +00:00
parent 91e9b2a45b
commit 2b498e78e9
7 changed files with 7 additions and 12 deletions

View File

@@ -46,13 +46,6 @@ void GraphicsService::Shutdown() noexcept {
initialized_ = false;
}
void GraphicsService::Shutdown() {
logging::TraceGuard trace("GraphicsService::Shutdown (IGraphicsService)");
// Services are shutdown individually by the registry
initialized_ = false;
}
void GraphicsService::InitializeDevice(SDL_Window* window, const GraphicsConfig& config) {
logging::TraceGuard trace("GraphicsService::InitializeDevice");

View File

@@ -38,7 +38,7 @@ public:
void InitializeDevice(SDL_Window* window, const GraphicsConfig& config) override;
void InitializeSwapchain() override;
void RecreateSwapchain() override;
void Shutdown() override;
void Shutdown() noexcept override;
void LoadShaders(const std::unordered_map<std::string, ShaderPaths>& shaders) override;
void UploadVertexData(const std::vector<core::Vertex>& vertices) override;
void UploadIndexData(const std::vector<uint16_t>& indices) override;

View File

@@ -66,7 +66,7 @@ std::array<float, 16> LuaScriptService::GetViewProjectionMatrix(float aspect) {
return engine_->GetViewProjectionMatrix(aspect);
}
std::unordered_map<std::string, script::ShaderManager::ShaderPaths> LuaScriptService::LoadShaderPathsMap() {
std::unordered_map<std::string, sdl3cpp::services::ShaderPaths> LuaScriptService::LoadShaderPathsMap() {
logging::TraceGuard trace;
if (!engine_) {

View File

@@ -30,7 +30,7 @@ public:
std::array<float, 16> ComputeModelMatrix(int functionRef, float time) override;
std::array<float, 16> GetViewProjectionMatrix(float aspect) override;
std::unordered_map<std::string, script::ShaderManager::ShaderPaths> LoadShaderPathsMap() override;
std::unordered_map<std::string, sdl3cpp::services::ShaderPaths> LoadShaderPathsMap() override;
std::vector<script::GuiCommand> LoadGuiCommands() override;
void UpdateGuiInput(const script::GuiInputSnapshot& input) override;

View File

@@ -51,7 +51,6 @@ private:
// Helper methods
void CreateInstance(const std::vector<const char*>& requiredExtensions);
void CreateSurface(SDL_Window* window);
void PickPhysicalDevice();
bool IsDeviceSuitable(VkPhysicalDevice device) const;
QueueFamilyIndices FindQueueFamilies(VkPhysicalDevice device) const;

View File

@@ -64,7 +64,7 @@ public:
/**
* @brief Shutdown and release all Vulkan resources.
*/
virtual void Shutdown() = 0;
virtual void Shutdown() noexcept = 0;
/**
* @brief Load and compile shader programs.

View File

@@ -8,6 +8,9 @@
#include <vulkan/vulkan.h>
namespace sdl3cpp::services {
/**
* @brief Pipeline service interface.
*
* Manages Vulkan graphics pipelines and shader compilation.
* Small, focused service (~200 lines) for pipeline management.