Quellcode durchsuchen

git-svn-id: https://svn.microneil.com/svn/SNFMulti/trunk@63 dc71a809-1921-45c4-985c-09c81d0142d9

wx
madscientist vor 9 Jahren
Ursprung
Commit
9081edfe1f
1 geänderte Dateien mit 14 neuen und 3 gelöschten Zeilen
  1. 14
    3
      SNFMulti.cpp

+ 14
- 3
SNFMulti.cpp Datei anzeigen

@@ -25,7 +25,7 @@ using namespace std;

//// Version Info

const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.1.3 Build: " __DATE__ " " __TIME__;
const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.1.4 Build: " __DATE__ " " __TIME__;

//// Script Caller Methods

@@ -1692,8 +1692,19 @@ int snf_EngineHandler::scanMessage(
while(NULL!=ResultCursor) { // While we have records to process...
captureMatchRecord(TmpSNFMatch, ResultCursor); // grab the next record and evaluate it.
bool isPanickedRule = MyCFGPacket.isRulePanic(TmpSNFMatch.ruleid);
bool isVotingCandidate = (false == isPanickedRule);
// Mitigate short-match rulebase events to prevent false positives.
const size_t minimumPatternLength = 5; // Establish a minimum match length.
size_t matchSpan = (TmpSNFMatch.endex - TmpSNFMatch.index); // Determine the length of this match.
bool isShortMatchEvent = (minimumPatternLength > matchSpan); // Identify short-match events.
bool isPanickedRule = ( // In addition to rule IDs that are
MyCFGPacket.isRulePanic(TmpSNFMatch.ruleid) || // in the rule-panic list also treat
isShortMatchEvent // short match events as panic rules.
);
bool isVotingCandidate = (false == isPanickedRule); // Panic rules can't vote.
bool isWhiteRule = (
MyCFGPacket.Config()->TrainingWhiteRuleHandler.isListed(TmpSNFMatch.ruleid) ||
0 == TmpSNFMatch.symbol

Laden…
Abbrechen
Speichern