Changeset View
Changeset View
Standalone View
Standalone View
src/lib/util/kformatprivate.cpp
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Line(s) | 52 | { | |||
---|---|---|---|---|---|
113 | 113 | | |||
114 | const PrefixMapEntry map[] = { | 114 | const PrefixMapEntry map[] = { | ||
115 | { KFormat::UnitPrefix::Yocto, 1e-24, bpow(-80), u'y' }, | 115 | { KFormat::UnitPrefix::Yocto, 1e-24, bpow(-80), u'y' }, | ||
116 | { KFormat::UnitPrefix::Zepto, 1e-21, bpow(-70), u'z' }, | 116 | { KFormat::UnitPrefix::Zepto, 1e-21, bpow(-70), u'z' }, | ||
117 | { KFormat::UnitPrefix::Atto, 1e-18, bpow(-60), u'a' }, | 117 | { KFormat::UnitPrefix::Atto, 1e-18, bpow(-60), u'a' }, | ||
118 | { KFormat::UnitPrefix::Femto, 1e-15, bpow(-50), u'f' }, | 118 | { KFormat::UnitPrefix::Femto, 1e-15, bpow(-50), u'f' }, | ||
119 | { KFormat::UnitPrefix::Pico, 1e-12, bpow(-40), u'p' }, | 119 | { KFormat::UnitPrefix::Pico, 1e-12, bpow(-40), u'p' }, | ||
120 | { KFormat::UnitPrefix::Nano, 1e-9, bpow(-30), u'n' }, | 120 | { KFormat::UnitPrefix::Nano, 1e-9, bpow(-30), u'n' }, | ||
121 | { KFormat::UnitPrefix::Micro, 1e-6, bpow(-20), u'µ' }, | 121 | // Thanks to broken MSVC, we can not use u'µ', but have to use the unicode codepoint | ||
dhaumann: Would it make sense to mention with which MSVC version this was tested? At some point in time… | |||||
For the record, the current version of MSVC in use is 19.14.26430.0 (MSVS 2017, v15.7.3) bcooksley: For the record, the current version of MSVC in use is 19.14.26430.0 (MSVS 2017, v15.7.3) | |||||
122 | { KFormat::UnitPrefix::Micro, 1e-6, bpow(-20), QChar(0xB5) }, | ||||
122 | { KFormat::UnitPrefix::Milli, 1e-3, bpow(-10), u'm' }, | 123 | { KFormat::UnitPrefix::Milli, 1e-3, bpow(-10), u'm' }, | ||
123 | { KFormat::UnitPrefix::Unity, 1.0, 1.0, u'\0' }, | 124 | { KFormat::UnitPrefix::Unity, 1.0, 1.0, u'\0' }, | ||
124 | { KFormat::UnitPrefix::Kilo, 1e3, bpow(10), u'k' }, | 125 | { KFormat::UnitPrefix::Kilo, 1e3, bpow(10), u'k' }, | ||
125 | { KFormat::UnitPrefix::Mega, 1e6, bpow(20), u'M' }, | 126 | { KFormat::UnitPrefix::Mega, 1e6, bpow(20), u'M' }, | ||
126 | { KFormat::UnitPrefix::Giga, 1e9, bpow(30), u'G' }, | 127 | { KFormat::UnitPrefix::Giga, 1e9, bpow(30), u'G' }, | ||
127 | { KFormat::UnitPrefix::Tera, 1e12, bpow(40), u'T' }, | 128 | { KFormat::UnitPrefix::Tera, 1e12, bpow(40), u'T' }, | ||
128 | { KFormat::UnitPrefix::Peta, 1e15, bpow(50), u'P' }, | 129 | { KFormat::UnitPrefix::Peta, 1e15, bpow(50), u'P' }, | ||
129 | { KFormat::UnitPrefix::Exa, 1e18, bpow(60), u'E' }, | 130 | { KFormat::UnitPrefix::Exa, 1e18, bpow(60), u'E' }, | ||
▲ Show 20 Lines • Show All 447 Lines • Show Last 20 Lines |
Would it make sense to mention with which MSVC version this was tested? At some point in time, this may be fixed, and then the comment is wrong.