1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-05 22:19:03 +00:00

Use std::multiset to keep script outputs in order instead of sorting.

This commit is contained in:
dmiller
2021-04-27 19:22:09 +00:00
parent 3adaa69cb2
commit bf9d60734d
6 changed files with 28 additions and 28 deletions

View File

@@ -2,7 +2,7 @@
#define NMAP_LUA_H
#include <vector>
#include <list>
#include <set>
#include <string>
#include "nse_lua.h"
@@ -30,9 +30,12 @@ class ScriptResult
void set_id (const char *);
const char *get_id (void) const;
void write_xml() const;
bool operator<(ScriptResult const &b) const {
return this->id.compare(b.id) < 0;
}
};
typedef std::list<ScriptResult> ScriptResults;
typedef std::multiset<ScriptResult> ScriptResults;
/* Call this to get a ScriptResults object which can be
* used to store Pre-Scan and Post-Scan script Results */