Skip to content
Snippets Groups Projects
Commit ba263341 authored by Scott Snyder's avatar Scott Snyder Committed by Graeme Stewart
Browse files

Fix coverity warnings. (EventBookkeeperTPCnv-00-01-09)

	* Tagging EventBookkeeperTPCnv-00-01-09.
	* Fix coverity warnings.

	* EventBookkeeperTPCnv/selection.xml: Fix tiny typo that now matters.

	* Fixed iterative m_childrenEB constructor/destructor and TPCnv (for p2)
parent 1a434acb
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,6 @@ class EventBookkeeper_p1 {
///////////////////////////////////////////////////////////////////////
EventBookkeeper_p1();
EventBookkeeper_p1(const EventBookkeeper_p1& rhs);
~EventBookkeeper_p1();
std::string m_name;
......
......@@ -22,6 +22,7 @@ class EventBookkeeper_p2 {
EventBookkeeper_p2();
EventBookkeeper_p2(const EventBookkeeper_p2& rhs);
EventBookkeeper_p2& operator=(const EventBookkeeper_p2& rhs);
~EventBookkeeper_p2();
std::string m_name;
......
......@@ -20,7 +20,6 @@ class SkimDecision_p1 {
///////////////////////////////////////////////////////////////////////
SkimDecision_p1();
SkimDecision_p1(const SkimDecision_p1& rhs);
~SkimDecision_p1();
std::string m_name;
......
......@@ -20,17 +20,3 @@ EventBookkeeper_p1::EventBookkeeper_p1()
m_childrenEB.clear();
}
EventBookkeeper_p1::EventBookkeeper_p1( const EventBookkeeper_p1& rhs )
{
m_name=rhs.m_name;
m_description=rhs.m_description;
m_parent=rhs.m_parent;
m_outputstream = rhs.m_outputstream;
m_logic = rhs.m_logic;
m_nAcceptedEvents=rhs.m_nAcceptedEvents;
m_nWeightedAcceptedEvents=rhs.m_nWeightedAcceptedEvents;
m_cycle=rhs.m_cycle;
m_childrenEB=rhs.m_childrenEB;
}
......@@ -21,25 +21,35 @@ EventBookkeeper_p2::EventBookkeeper_p2()
}
EventBookkeeper_p2::EventBookkeeper_p2( const EventBookkeeper_p2& rhs )
: m_childrenEB(0)
{
m_name=rhs.m_name;
m_description=rhs.m_description;
m_inputstream=rhs.m_inputstream;
m_outputstream = rhs.m_outputstream;
m_logic = rhs.m_logic;
m_nAcceptedEvents=rhs.m_nAcceptedEvents;
m_nWeightedAcceptedEvents=rhs.m_nWeightedAcceptedEvents;
m_cycle=rhs.m_cycle;
//Make a new deep copy of the children by calling the constructor iteratively (as this becomes the new owner of these objects)
if (!rhs.m_childrenEB)
m_childrenEB = 0;
else {
m_childrenEB = new std::vector<EventBookkeeper_p2*>;
for(unsigned int i=0; i<rhs.m_childrenEB->size(); i++){
EventBookkeeper_p2* child=new EventBookkeeper_p2(*rhs.m_childrenEB->at(i));
m_childrenEB->push_back(child);
*this = rhs;
}
EventBookkeeper_p2& EventBookkeeper_p2::operator=( const EventBookkeeper_p2& rhs )
{
if (this != &rhs) {
m_name=rhs.m_name;
m_description=rhs.m_description;
m_inputstream=rhs.m_inputstream;
m_outputstream = rhs.m_outputstream;
m_logic = rhs.m_logic;
m_nAcceptedEvents=rhs.m_nAcceptedEvents;
m_nWeightedAcceptedEvents=rhs.m_nWeightedAcceptedEvents;
m_cycle=rhs.m_cycle;
//Make a new deep copy of the children by calling the constructor iteratively (as this becomes the new owner of these objects)
delete m_childrenEB;
if (!rhs.m_childrenEB)
m_childrenEB = 0;
else {
m_childrenEB = new std::vector<EventBookkeeper_p2*>;
for(unsigned int i=0; i<rhs.m_childrenEB->size(); i++){
EventBookkeeper_p2* child=new EventBookkeeper_p2(*rhs.m_childrenEB->at(i));
m_childrenEB->push_back(child);
}
}
}
return *this;
}
EventBookkeeper_p2::~EventBookkeeper_p2()
......
......@@ -13,10 +13,3 @@ SkimDecision_p1::SkimDecision_p1()
m_isAccepted=true;
}
SkimDecision_p1::SkimDecision_p1( const SkimDecision_p1& rhs )
{
m_name=rhs.m_name;
m_isAccepted=rhs.m_isAccepted;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment