Skip to content
Snippets Groups Projects
Commit 77934728 authored by an7s's avatar an7s
Browse files

Use references instead of pointers for STARS optins

Former-commit-id: 9b485bb3f4a25fd36f7b006673a1125589ec16bd
parent bbe09d64
Branches
Tags
No related merge requests found
......@@ -44,20 +44,20 @@ namespace STARS
IRDB_Interface_t(libIRDB::pqxxDB_t &p_pqxx_interface)
: pqxx_interface(p_pqxx_interface)
{
STARSOptions = new STARS::Option_t();
};
STARS::Option_t *GetSTARSOptions(void) { return STARSOptions; };
STARS::Option_t& GetSTARSOptions(void) { return STARSOptions; };
const STARS::Option_t& GetSTARSOptions(void) const { return STARSOptions; };
// invoke stars on one file.
int do_STARS(libIRDB::FileIR_t* firp);
MEDS_Annotation::MEDS_AnnotationParser & getAnnotations() { return parser; }
const MEDS_Annotation::MEDS_AnnotationParser & getAnnotations() const { return parser; }
private:
libIRDB::pqxxDB_t &pqxx_interface;
MEDS_Annotation::MEDS_AnnotationParser parser;
STARS::Option_t *STARSOptions;
STARS::Option_t STARSOptions;
};
}
......
......@@ -166,20 +166,20 @@ int STARS::IRDB_Interface_t::do_STARS(FileIR_t* firp)
Init_stars_global_program(firp);
// Set options into the GSP
if (this->GetSTARSOptions()->ShouldSTARSPerformLevel2ReducedAnalysis()) {
if (this->GetSTARSOptions().ShouldSTARSPerformLevel2ReducedAnalysis()) {
global_STARS_program->SetLevel2ReducedProcessingFlag(true);
SMP_msg("INFO: Level 2 Reduced processing requested via command-line options.\n");
}
else if (this->GetSTARSOptions()->ShouldSTARSPerformReducedAnalysis()) {
else if (this->GetSTARSOptions().ShouldSTARSPerformReducedAnalysis()) {
global_STARS_program->SetReducedProcessingFlag(true);
SMP_msg("INFO: Reduced processing requested via command-line options.\n");
}
if (this->GetSTARSOptions()->ShouldSTARSShadowFuncPtrs()) {
if (this->GetSTARSOptions().ShouldSTARSShadowFuncPtrs()) {
global_STARS_program->SetFuncPtrShadowingFlag(true);
SMP_msg("INFO: Function pointer shadowing requested via command-line options.\n");
}
if (this->GetSTARSOptions()->ShouldSTARSShadowCriticalArgs()) {
if (this->GetSTARSOptions().ShouldSTARSShadowCriticalArgs()) {
global_STARS_program->SetArgShadowingFlag(true);
SMP_msg("INFO: Critical argument shadowing requested via command-line options.\n");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment