diff --git a/src/basic/vx_util/data_line.h b/src/basic/vx_util/data_line.h index 791f5266d8..c7361d7652 100644 --- a/src/basic/vx_util/data_line.h +++ b/src/basic/vx_util/data_line.h @@ -51,7 +51,7 @@ class DataLine { friend std::ostream & operator<<(std::ostream &, const DataLine &); friend Logger & operator<<(Logger &, const DataLine &); - protected: + private: std::string Line; std::vector Items; diff --git a/src/basic/vx_util/num_array.cc b/src/basic/vx_util/num_array.cc index 19bc538d02..d299f8cb8a 100644 --- a/src/basic/vx_util/num_array.cc +++ b/src/basic/vx_util/num_array.cc @@ -39,12 +39,6 @@ using namespace std; //////////////////////////////////////////////////////////////////////// -NumArray::NumArray() {} - - -//////////////////////////////////////////////////////////////////////// - - NumArray::~NumArray() { diff --git a/src/basic/vx_util/num_array.h b/src/basic/vx_util/num_array.h index c1654c2b02..1d6dab93ab 100644 --- a/src/basic/vx_util/num_array.h +++ b/src/basic/vx_util/num_array.h @@ -39,7 +39,7 @@ class NumArray { public: - NumArray(); + NumArray() = default; ~NumArray(); NumArray(const NumArray &); explicit NumArray(const std::vector &a) : e(a) {}; diff --git a/src/basic/vx_util/observation.h b/src/basic/vx_util/observation.h index caf03478af..8b6ba86409 100644 --- a/src/basic/vx_util/observation.h +++ b/src/basic/vx_util/observation.h @@ -208,11 +208,7 @@ class Observation } -protected: - - /////////////////////// - // Protected members // - /////////////////////// +private: std::string _headerType; std::string _stationId; @@ -230,6 +226,7 @@ class Observation double _height; double _value; +protected: /////////////////////// // Protected methods // diff --git a/src/libcode/vx_summary/summary_key.h b/src/libcode/vx_summary/summary_key.h index bdc910b05a..28b021d8d9 100644 --- a/src/libcode/vx_summary/summary_key.h +++ b/src/libcode/vx_summary/summary_key.h @@ -168,11 +168,7 @@ class SummaryKey return _varCode < other._varCode; } -protected: - - /////////////////////// - // Protected members // - /////////////////////// +private: std::string _headerType; std::string _stationId; diff --git a/src/libcode/vx_summary/summary_obs.h b/src/libcode/vx_summary/summary_obs.h index dd970824fe..e8383ab472 100644 --- a/src/libcode/vx_summary/summary_obs.h +++ b/src/libcode/vx_summary/summary_obs.h @@ -51,21 +51,16 @@ class SummaryObs long countHeaders(std::vector< Observation > &obs_vector); long countSummaryHeaders(); time_t getValidTime(const std::string &time_string) const; - TimeSummaryInfo getSummaryInfo(); + TimeSummaryInfo getSummaryInfo() const; void setSummaryInfo(const TimeSummaryInfo &summary_info); StringArray getObsNames() const; StringArray getObsUnits() const; StringArray getObsDescs() const; -protected: +private: static const float FILL_VALUE; - - /////////////////////// - // Protected members // - /////////////////////// - bool dataSummarized; TimeSummaryInfo summaryInfo; @@ -76,6 +71,8 @@ class SummaryObs StringArray obs_units; StringArray obs_descs; +protected: + /////////////////////// // Protected methods // /////////////////////// @@ -263,7 +260,7 @@ inline StringArray SummaryObs::getObsUnits() const { return obs_uni inline StringArray SummaryObs::getObsDescs() const { return obs_descs; } inline void SummaryObs::setSummaryInfo(const TimeSummaryInfo &summary_info) { summaryInfo = summary_info; } -inline TimeSummaryInfo SummaryObs::getSummaryInfo() { return summaryInfo; } +inline TimeSummaryInfo SummaryObs::getSummaryInfo() const { return summaryInfo; } //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_tc_util/pair_data_genesis.cc b/src/libcode/vx_tc_util/pair_data_genesis.cc index bed92a9e49..c79f60c27b 100644 --- a/src/libcode/vx_tc_util/pair_data_genesis.cc +++ b/src/libcode/vx_tc_util/pair_data_genesis.cc @@ -241,15 +241,14 @@ void PairDataGenesis::add_fcst_gen(const GenesisInfo *fgi) { if(!fgi) return; - GenesisPairDiff diff; - // Add the unmatched forecast NPair++; BestStormId.add(na_str); InitTime.add(fgi->init()); LeadTime.add(fgi->genesis_lead()); FcstGen.emplace_back(fgi); - BestGen.emplace_back((GenesisInfo *) 0); + BestGen.emplace_back(nullptr); + GenesisPairDiff diff; GenDiff.emplace_back(diff); return; @@ -296,7 +295,7 @@ void PairDataGenesis::add_best_gen(const GenesisInfo *bgi, BestStormId.add(bgi->storm_id()); InitTime.add(init_ut); LeadTime.add(bgi->genesis_time() - init_ut); - FcstGen.emplace_back((GenesisInfo *) 0); + FcstGen.emplace_back(nullptr); BestGen.emplace_back(bgi); GenDiff.emplace_back(diff); } @@ -313,7 +312,6 @@ void PairDataGenesis::add_gen_pair(const GenesisInfo *fgi, if(!fgi || !bgi) return; int i_case; - GenesisPairDiff diff; // Update an existing case if(has_case(bgi->storm_id(), fgi->init(), i_case)) { @@ -328,6 +326,7 @@ void PairDataGenesis::add_gen_pair(const GenesisInfo *fgi, LeadTime.add(fgi->genesis_lead()); FcstGen.emplace_back(fgi); BestGen.emplace_back(bgi); + GenesisPairDiff diff; GenDiff.emplace_back(diff); } diff --git a/src/libcode/vx_tc_util/track_info.cc b/src/libcode/vx_tc_util/track_info.cc index d2e6561294..a169146ece 100644 --- a/src/libcode/vx_tc_util/track_info.cc +++ b/src/libcode/vx_tc_util/track_info.cc @@ -192,11 +192,10 @@ ConcatString TrackInfo::serialize() const { ConcatString TrackInfo::serialize_r(int n, int indent_depth) const { Indent prefix(indent_depth); ConcatString s; - int i; s << prefix << "[" << n << "] " << serialize() << ", Points:\n"; - for(i=0; i