| 116 | } |
| 117 | |
| 118 | void OSQuantityVector::push_back(Quantity q) { |
| 119 | if (!(q.units() == units())) { |
| 120 | LOG_AND_THROW("Quantity " << q |
| 121 | << " is incompatible with this OSQuantityVector, which has " |
| 122 | "units " |
| 123 | << units() << "."); |
| 124 | } else if (q.scale() != scale()) { |
| 125 | q.setScale(scale().exponent); |
| 126 | } |
| 127 | m_values.push_back(q.value()); |
| 128 | } |
| 129 | |
| 130 | void OSQuantityVector::pop_back() { |
| 131 | m_values.pop_back(); |