From 0ace4243cffda8fd1c1966391a3154fa2c14b4a6 Mon Sep 17 00:00:00 2001 From: Folling Date: Tue, 30 Jan 2024 09:34:13 +0100 Subject: [PATCH] make project functions const where appropriate Signed-off-by: Folling --- include/ikarus/persistence/project.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/include/ikarus/persistence/project.h b/include/ikarus/persistence/project.h index f1f083a..7847a78 100644 --- a/include/ikarus/persistence/project.h +++ b/include/ikarus/persistence/project.h @@ -89,7 +89,7 @@ IKA_API char const * ikarus_project_get_path(IkarusProject const * project, Ikar /// \param entities_out_size The size of the buffer. /// \param error_out \see errors.h IKA_API void ikarus_project_get_entities( - IkarusProject * project, + IkarusProject const * project, struct IkarusEntity ** entities_out, size_t entities_out_size, IkarusErrorData * error_out @@ -101,7 +101,7 @@ IKA_API void ikarus_project_get_entities( /// \pre \li Must exist. /// \param error_out \see errors.h /// \return The number of entities or undefined if an error occurs. -IKA_API size_t ikarus_project_get_entity_count(IkarusProject * project, IkarusErrorData * error_out); +IKA_API size_t ikarus_project_get_entity_count(IkarusProject const * project, IkarusErrorData * error_out); /// \brief Gets the blueprints of a project. /// \param project The project to get the blueprints of. @@ -112,7 +112,7 @@ IKA_API size_t ikarus_project_get_entity_count(IkarusProject * project, IkarusEr /// \param blueprints_out_size The size of the buffer. /// \param error_out \see errors.h IKA_API void ikarus_project_get_blueprints( - IkarusProject * project, + IkarusProject const * project, struct IkarusBlueprint ** blueprints_out, size_t blueprints_out_size, IkarusErrorData * error_out @@ -135,11 +135,7 @@ IKA_API size_t ikarus_project_get_blueprint_count(IkarusProject const * project, /// \pre \li Must not be empty. /// \param error_out \see errors.h /// \return The entity with the given name or null if none was found. -IKA_API struct IkarusEntity* get_entity_by_name( - IkarusProject const * project, - char const * name, - IkarusErrorData * error_out -); +IKA_API struct IkarusEntity * get_entity_by_name(IkarusProject const * project, char const * name, IkarusErrorData * error_out); /// \brief Finds a property by a given name. /// \param project The project to search.