Convert direct pointer refs to shared_ptr

Some objects used by falco (falco outputs, falco_formats, etc) were
using raw pointer references, which isn't great.

So convert use of raw pointers (originally passed from falco_init or
functions it called) with shared_ptr, as they are now held in
application state.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
Mark Stemm
2022-03-02 17:38:22 -08:00
committed by poiana
parent 531bc3eb5a
commit 0a51f4f1f1
10 changed files with 35 additions and 34 deletions

View File

@@ -20,7 +20,7 @@ limitations under the License.
#include "falco_engine.h"
#include "banned.h" // This raises a compilation error when certain functions are used
falco_formats::falco_formats(falco_engine *engine,
falco_formats::falco_formats(std::shared_ptr<falco_engine> engine,
bool json_include_output_property,
bool json_include_tags_property)
: m_falco_engine(engine),