[libcxx-commits] [PATCH] D99091: [locale][num_get] Improve Stage 2 of string to float conversion

Mikhail Maltsev via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 7 08:09:56 PDT 2021


miyuki added inline comments.


================
Comment at: libcxx/include/locale:524
+
+  if (__ct == __decimal_point) {
+    if (!__in_units)
----------------
I think it would be better to keep 4-space indentation for consistency with the rest of the file. See https://github.com/llvm/llvm-project/commit/7004d6664efde9d1148ed677649593f989cc6056


================
Comment at: libcxx/include/locale:581
+    // Not '.' or __thousands_sep or '+' or '-' or 'x' or __exp or digit.
+    // Special handling for the characters in INF/INFINITY/NAN.
+    // These must appear at the start of the sequence, possibly preceeded by + or -.
----------------
Would it be easier to handle these special cases outside of the loop?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99091/new/

https://reviews.llvm.org/D99091



More information about the libcxx-commits mailing list