This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch dev-1-2-13
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git

commit d7e6d15fd9f3b705732a40ff0e4bae4d5ad8ad39
Author: Alan M. Carroll <[email protected]>
AuthorDate: Thu Nov 5 14:40:47 2020 -0600

    Fix svto_radix comment.
---
 code/include/swoc/TextView.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/code/include/swoc/TextView.h b/code/include/swoc/TextView.h
index 78aded2..40485a0 100644
--- a/code/include/swoc/TextView.h
+++ b/code/include/swoc/TextView.h
@@ -808,13 +808,6 @@ uintmax_t svtou(TextView src, TextView *parsed = nullptr, 
int base = 0);
  * inside @c svtoi for the common cases of 8, 10, and 16, therefore normally 
this isn't much more
  * performant in those cases than just @c svtoi. Because of this only positive 
values are parsed.
  * If determining the radix from the text or signed value parsing is needed, 
used @c svtoi.
- * This is a specialized function useful only where conversion performance is 
critical, or for some
- * other reason the numeric text has already been parsed out. The performance 
gains comes from
- * templating the divisor which enables the compiler to optimize the 
multiplication (e.g., for
- * powers of 2 shifts is used). It is used inside @c svtoi and @c svtou for 
the common cases of 8,
- * 10, and 16, therefore normally this isn't much more performant than @c 
svtoi. Because of this
- * only positive values are parsed. If determining the radix from the text or 
signed value parsing
- * is needed, used @c svtoi.
  *
  * @a src is updated in place to indicate what characters were parsed. Parsing 
stops on the first
  * invalid digit, so any leading non-digit characters (e.g. whitespace) must 
already be removed.
@@ -832,8 +825,7 @@ svto_radix(swoc::TextView &src) {
   while (src.size() && (0 <= (v = swoc::svtoi_convert[uint8_t(*src)])) && v < 
N)
   {
     auto n = zret * N + v;
-    if (n < zret)
-    { // overflow / wrap
+    if (n < zret) { // overflow / wrap
       return std::numeric_limits<uintmax_t>::max();
     }
     zret = n;

Reply via email to