mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
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:
parent
3932fd930f
commit
3a3f9af40d
2 changed files with 6 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue