mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-31 06:01:52 +00:00
cleanup(engine): remove unreachable function engine::read_file
Signed-off-by: Luca Guerra <luca@guerra.sh>
This commit is contained in:
parent
910788850a
commit
28e7050f0f
@ -891,17 +891,6 @@ std::shared_ptr<filter_ruleset> falco_engine::ruleset_for_source(std::size_t sou
|
||||
return source->ruleset;
|
||||
}
|
||||
|
||||
void falco_engine::read_file(const std::string &filename, std::string &contents) {
|
||||
std::ifstream is;
|
||||
|
||||
is.open(filename);
|
||||
if(!is.is_open()) {
|
||||
throw falco_exception("Could not open " + filename + " for reading");
|
||||
}
|
||||
|
||||
contents.assign(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>());
|
||||
}
|
||||
|
||||
static bool check_plugin_requirement_alternatives(
|
||||
const std::vector<falco_engine::plugin_version_requirement> &plugins,
|
||||
const rule_loader::plugin_version_info::requirement_alternatives &alternatives,
|
||||
|
@ -378,9 +378,6 @@ private:
|
||||
|
||||
filter_ruleset::engine_state_funcs m_engine_state;
|
||||
|
||||
// Throws falco_exception if the file can not be read
|
||||
void read_file(const std::string &filename, std::string &contents);
|
||||
|
||||
indexed_vector<falco_source> m_sources;
|
||||
|
||||
inline const falco_source *find_source(std::size_t index) {
|
||||
|
Loading…
Reference in New Issue
Block a user