mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +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());
|
return val_mgr->Count(string_val->Len());
|
||||||
}
|
}
|
||||||
|
|
||||||
int StringVal::Len()
|
int StringVal::Len() const
|
||||||
{
|
{
|
||||||
return AsString()->Len();
|
return AsString()->Len();
|
||||||
}
|
}
|
||||||
|
|
||||||
const u_char* StringVal::Bytes()
|
const u_char* StringVal::Bytes() const
|
||||||
{
|
{
|
||||||
return AsString()->Bytes();
|
return AsString()->Bytes();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* StringVal::CheckString()
|
const char* StringVal::CheckString() const
|
||||||
{
|
{
|
||||||
return AsString()->CheckString();
|
return AsString()->CheckString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -533,9 +533,9 @@ public:
|
||||||
|
|
||||||
ValPtr SizeVal() const override;
|
ValPtr SizeVal() const override;
|
||||||
|
|
||||||
int Len();
|
int Len() const;
|
||||||
const u_char* Bytes();
|
const u_char* Bytes() const;
|
||||||
const char* CheckString();
|
const char* CheckString() const;
|
||||||
|
|
||||||
// Note that one needs to de-allocate the return value of
|
// Note that one needs to de-allocate the return value of
|
||||||
// ExpandedString() to avoid a memory leak.
|
// ExpandedString() to avoid a memory leak.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue