Commit d0873dd5 authored by fmg005's avatar fmg005

use string empty() method to check emptiness instead of !=

parent 2f74b654
......@@ -13,12 +13,12 @@ std::map<std::string,CLA::Pump*>& pumps) : m_logger(logger), m_pumps(pumps) {
}
void Action::initialize(std::unique_ptr<PhysiologyEngine>& engine) {
if (m_pumps["bpdrug"]->getSubstance() != "") {
if (!m_pumps["bpdrug"]->getSubstance().empty()) {
m_bpdrug = engine->GetSubstanceManager().GetSubstance(m_pumps["bpdrug"]->getSubstance());
m_bpdrug_infusion = new SESubstanceInfusion(*m_bpdrug);
m_bpdrug_infusion->GetConcentration().SetValue(NorepiConcentration, MassPerVolumeUnit::ug_Per_mL);
}
if (m_pumps["saline"]->getSubstance() != "") {
if (!m_pumps["saline"]->getSubstance().empty()) {
m_saline = engine->GetSubstanceManager().GetCompound(m_pumps["saline"]->getSubstance());
m_infusion = new SESubstanceCompoundInfusion(*m_saline);
m_infusion->GetBagVolume().SetValue(SalineBagVolume, VolumeUnit::mL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment