From e600d30295d8e563091440a38d41335b8c4311a0 Mon Sep 17 00:00:00 2001 From: Powerbyte7 <40431794+Powerbyte7@users.noreply.github.com> Date: Mon, 11 May 2026 11:02:42 +0200 Subject: [PATCH] Fix constness in C++ header methods. This commit fixes mismatches in pointer constness between the C and C++ headers. These changes are non-breaking. --- include/osdp.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/osdp.hpp b/include/osdp.hpp index dc66ed25..88a21e8d 100644 --- a/include/osdp.hpp +++ b/include/osdp.hpp @@ -90,7 +90,7 @@ class OSDP_EXPORT ControlPanel : public Common { } } - bool setup(const struct osdp_channel *channel, int num_pd, osdp_pd_info_t *info) + bool setup(const struct osdp_channel *channel, int num_pd, const osdp_pd_info_t *info) { _ctx = osdp_cp_setup(channel, num_pd, info); return _ctx != nullptr; @@ -101,7 +101,7 @@ class OSDP_EXPORT ControlPanel : public Common { return false; } - int add_pd(int num_pd, osdp_pd_info_t *info) + int add_pd(int num_pd, const osdp_pd_info_t *info) { return osdp_cp_add_pd(_ctx, num_pd, info); } @@ -112,12 +112,12 @@ class OSDP_EXPORT ControlPanel : public Common { } [[deprecated]] - int send_command(int pd, struct osdp_cmd *cmd) + int send_command(int pd, const struct osdp_cmd *cmd) { return osdp_cp_submit_command(_ctx, pd, cmd); } - int submit_command(int pd, struct osdp_cmd *cmd) + int submit_command(int pd, const struct osdp_cmd *cmd) { return osdp_cp_submit_command(_ctx, pd, cmd); } @@ -189,7 +189,7 @@ class OSDP_EXPORT PeripheralDevice : public Common { } } - bool setup(struct osdp_channel *channel, osdp_pd_info_t *info) + bool setup(struct osdp_channel *channel, const osdp_pd_info_t *info) { _ctx = osdp_pd_setup(channel, info); return _ctx != nullptr;