| 111 | } |
| 112 | |
| 113 | bool Unit_Impl::setScale(int scaleExponent) { |
| 114 | ScaleConstant candidate = ScaleFactory::instance().createScale(scaleExponent); |
| 115 | if (candidate().value == 0.0) { |
| 116 | return false; |
| 117 | } |
| 118 | m_scale = candidate; |
| 119 | return true; |
| 120 | } |
| 121 | |
| 122 | bool Unit_Impl::setScale(const std::string& scaleAbbreviation) { |
| 123 | ScaleConstant candidate = ScaleFactory::instance().createScale(scaleAbbreviation); |