mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
RuleActionMIME: Switch to std::string
And return const std::string& from GetMIME(). Probably not at all performance relevant, but while I'm already here.
This commit is contained in:
parent
a7b077aa17
commit
e8241e16ee
2 changed files with 4 additions and 9 deletions
|
@ -46,18 +46,16 @@ class RuleActionMIME : public RuleAction {
|
|||
public:
|
||||
explicit RuleActionMIME(const char* arg_mime, int arg_strength = 0);
|
||||
|
||||
~RuleActionMIME() override { delete[] mime; }
|
||||
|
||||
void DoAction(const Rule* parent, RuleEndpointState* state, const u_char* data, int len) override {}
|
||||
|
||||
void PrintDebug() override;
|
||||
|
||||
std::string GetMIME() const { return mime; }
|
||||
const std::string& GetMIME() const { return mime; }
|
||||
|
||||
int GetStrength() const { return strength; }
|
||||
|
||||
private:
|
||||
const char* mime;
|
||||
std::string mime;
|
||||
int strength;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue