Commit 82682699 authored by fmg005's avatar fmg005

use string empty() method to check emptiness

parent 87ae6213
......@@ -29,7 +29,7 @@ void Action::infuse_drug(std::unique_ptr<PhysiologyEngine>& engine) {
bpdrug_rate = m_pumps["bpdrug"]->getCurrentInfusionRate();
saline_rate = m_pumps["saline"]->getCurrentInfusionRate();
if (m_pumps["bpdrug"]->getSubstance() != "") {
if (!m_pumps["bpdrug"]->getSubstance().empty()) {
if (bpdrug_prev_rate != bpdrug_rate && bpdrug_rate > 0) {
m_bpdrug_infusion->GetRate().SetValue(bpdrug_rate, VolumePerTimeUnit::mL_Per_hr);
engine->ProcessAction(*m_bpdrug_infusion);
......@@ -38,7 +38,7 @@ void Action::infuse_drug(std::unique_ptr<PhysiologyEngine>& engine) {
+to_string(int(bpdrug_rate))+" mL/hr");
}
}
if (m_pumps["saline"]->getSubstance() != "") {
if (!m_pumps["saline"]->getSubstance().empty()) {
if (saline_prev_rate != saline_rate && saline_rate > 0) {
m_infusion->GetRate().SetValue(saline_rate, VolumePerTimeUnit::mL_Per_hr);
engine->ProcessAction(*m_infusion);
......
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