Skip to content

Commit

Permalink
Per #1809, stop storing a pointer to the BEST genesis info object in …
Browse files Browse the repository at this point in the history
…ProbGenInfo. That was kludgy.
  • Loading branch information
JohnHalleyGotway committed Nov 13, 2021
1 parent 9a722e1 commit b9dd9f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
17 changes: 1 addition & 16 deletions met/src/libcode/vx_tc_util/prob_gen_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ void ProbGenInfo::clear() {
GenOrDis.clear();
GenesisTime = (unixtime) 0;
GenesisLead = 0;
BestGen = (const GenesisInfo *) 0;

return;
}
Expand All @@ -95,7 +94,6 @@ void ProbGenInfo::dump(ostream &out, int indent_depth) const {
out << prefix << "GenOrDis = \"" << GenOrDis.contents() << "\"\n";
out << prefix << "GenesisTime = " << unix_to_yyyymmdd_hhmmss(GenesisTime) << "\n";
out << prefix << "GenesisLead = " << sec_to_hhmmss(GenesisLead) << "\n";
out << prefix << "BestGen = " << (BestGen ? "set" : "(nul)") << "\n";

out << flush;

Expand All @@ -113,8 +111,7 @@ ConcatString ProbGenInfo::serialize() const {
<< "Initials = \"" << Initials << "\""
<< ", GenOrDis = \"" << GenOrDis << "\""
<< ", GenesisTime = " << unix_to_yyyymmdd_hhmmss(GenesisTime)
<< ", GenesisLead = " << sec_to_hhmmss(GenesisLead)
<< ", BestGen = " << (BestGen ? "set" : "(nul)") << "\n";
<< ", GenesisLead = " << sec_to_hhmmss(GenesisLead) << "\n";

return(s);
}
Expand All @@ -141,16 +138,6 @@ void ProbGenInfo::assign(const ProbGenInfo &p) {
GenOrDis = p.GenOrDis;
GenesisTime = p.GenesisTime;
GenesisLead = p.GenesisLead;
BestGen = p.BestGen;

return;
}

////////////////////////////////////////////////////////////////////////

void ProbGenInfo::set_best_gen(const GenesisInfo *bg) {

BestGen = bg;

return;
}
Expand Down Expand Up @@ -181,8 +168,6 @@ void ProbGenInfo::initialize(const ATCFProbLine &l, double dland) {
GenesisLead = (GenesisTime == 0 ? bad_data_int :
GenesisTime - InitTime);

BestGen = (const GenesisInfo *) 0;

return;
}

Expand Down
4 changes: 0 additions & 4 deletions met/src/libcode/vx_tc_util/prob_gen_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ class ProbGenInfo : public ProbInfoBase {
unixtime GenesisTime;
int GenesisLead;

// Pointer to the matching BEST genesis event
const GenesisInfo * BestGen;

public:

ProbGenInfo();
Expand Down Expand Up @@ -93,7 +90,6 @@ inline const ConcatString & ProbGenInfo::initials() const { return(Initials)
inline const ConcatString & ProbGenInfo::gen_or_dis() const { return(GenOrDis); }
inline unixtime ProbGenInfo::genesis_time() const { return(GenesisTime); }
inline int ProbGenInfo::genesis_lead() const { return(GenesisLead); }
inline const GenesisInfo * ProbGenInfo::best_gen() const { return(BestGen); }

////////////////////////////////////////////////////////////////////////

Expand Down

0 comments on commit b9dd9f0

Please sign in to comment.