Quellcode durchsuchen

tidy namespaces for scanner

master
Pete McNeil vor 4 Jahren
Ursprung
Commit
d122549f7e
2 geänderte Dateien mit 4 neuen und 7 gelöschten Zeilen
  1. 2
    2
      scanner.cpp
  2. 2
    5
      scanner.hpp

+ 2
- 2
scanner.cpp Datei anzeigen

@@ -36,7 +36,7 @@

// Scanner::LoadRuleBase(RuleFileName, SecurityKey)

void Scanner::LoadRuleBase(string& RuleFileName, string& SecurityKey) {
void Scanner::LoadRuleBase(std::string& RuleFileName, std::string& SecurityKey) {
RuleBase.Load(RuleFileName); // Load the rulebase file.
RuleBase.Validate(SecurityKey); // Validate the rulebase file.
@@ -79,7 +79,7 @@ EvaluationMatrix* Scanner::ScanMessage(unsigned char* MessageBuffer) { // Scan
myEvaluationMatrix->EvaluateThis(IZ.GetByte());
}

catch(FilterChain::Empty) { // We're expecting this so it's ok, but
catch(const FilterChain::Empty&) { // We're expecting this so it's ok, but
} // anything else will still be thrown!
return myEvaluationMatrix; // Return our results.

+ 2
- 5
scanner.hpp Datei anzeigen

@@ -25,8 +25,7 @@
// locate compound rules or parameter scans used to pick up tuning data from the
// rulebase.

#ifndef _MN_Scanner
#define _MN_Scanner
#pragma once

#include "FilterChain.hpp"
#include "snf_engine.hpp"
@@ -56,7 +55,7 @@ class Scanner {
}
}

void LoadRuleBase(string& RuleFileName, string& SecurityKey); // Load & Validate RuleBase.
void LoadRuleBase(std::string& RuleFileName, std::string& SecurityKey); // Load & Validate RuleBase.

EvaluationMatrix* ScanMessage(unsigned char* MessageBuffer); // Scan with filter chain.

@@ -65,5 +64,3 @@ class Scanner {
inline EvaluationMatrix* GetMatrix(){return myEvaluationMatrix;} // Return the latest matrix.
};

#endif

Laden…
Abbrechen
Speichern