From f72f8bb5173008d19b8fde8e9173557a926173e3 Mon Sep 17 00:00:00 2001 From: Brad Hards Date: Thu, 11 Jan 2024 17:46:36 +1100 Subject: [PATCH] make comment_exchange string const --- src/core/codestream/ojph_params.cpp | 4 ++-- src/core/common/ojph_params.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/codestream/ojph_params.cpp b/src/core/codestream/ojph_params.cpp index 6fe5e567..fa194431 100644 --- a/src/core/codestream/ojph_params.cpp +++ b/src/core/codestream/ojph_params.cpp @@ -368,7 +368,7 @@ namespace ojph { //////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// - void comment_exchange::set_string(char* str) + void comment_exchange::set_string(const char* str) { size_t t = strlen(str); if (len > 65531) @@ -380,7 +380,7 @@ namespace ojph { } ////////////////////////////////////////////////////////////////////////// - void comment_exchange::set_data(char* data, ui16 len) + void comment_exchange::set_data(const char* data, ui16 len) { if (len > 65531) OJPH_ERROR(0x000500C2, diff --git a/src/core/common/ojph_params.h b/src/core/common/ojph_params.h index d17e8d2c..2ab85db4 100644 --- a/src/core/common/ojph_params.h +++ b/src/core/common/ojph_params.h @@ -176,12 +176,12 @@ namespace ojph { public: comment_exchange() : data(NULL), len(0), Rcom(0) {} OJPH_EXPORT - void set_string(char* str); + void set_string(const char* str); OJPH_EXPORT - void set_data(char* data, ui16 len); + void set_data(const char* data, ui16 len); private: - char* data; + const char* data; ui16 len; ui16 Rcom; };