Skip to content

Commit

Permalink
Merge pull request #119 from bradh/const_comment
Browse files Browse the repository at this point in the history
make comment_exchange string const
  • Loading branch information
aous72 authored Jan 11, 2024
2 parents c2d68b3 + f72f8bb commit 3b78417
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core/codestream/ojph_params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/core/common/ojph_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 3b78417

Please sign in to comment.