Commit 2e8863d
committed
[RF][HS3] Simplify isNumber using standard stream parsing
Replace the hand-rolled character-by-character number parser with a
std::istringstream extraction that requires the whole string to be
consumed. This mirrors the parsing done by toDouble(), so isNumber(s) is
true exactly when toDouble(s) can convert the entire string.
std::from_chars for floating-point types is not portably available on all
platforms ROOT supports, so the stream extraction is used instead.1 parent f87a55e commit 2e8863d
1 file changed
Lines changed: 7 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
186 | 164 | | |
187 | 165 | | |
188 | 166 | | |
| |||
0 commit comments