Make some StringVal functions const

I noticed these while working on the TLS changes - I do not see a good
reason why they should not be const.
This commit is contained in:
Johanna Amann 2022-01-14 11:04:11 +00:00
parent 3932fd930f
commit 3a3f9af40d
2 changed files with 6 additions and 6 deletions

View file

@ -953,17 +953,17 @@ ValPtr StringVal::SizeVal() const
return val_mgr->Count(string_val->Len());
}
int StringVal::Len()
int StringVal::Len() const
{
return AsString()->Len();
}
const u_char* StringVal::Bytes()
const u_char* StringVal::Bytes() const
{
return AsString()->Bytes();
}
const char* StringVal::CheckString()
const char* StringVal::CheckString() const
{
return AsString()->CheckString();
}

View file

@ -533,9 +533,9 @@ public:
ValPtr SizeVal() const override;
int Len();
const u_char* Bytes();
const char* CheckString();
int Len() const;
const u_char* Bytes() const;
const char* CheckString() const;
// Note that one needs to de-allocate the return value of
// ExpandedString() to avoid a memory leak.