github-actions[bot] commented on code in PR #25944:
URL: https://github.com/apache/doris/pull/25944#discussion_r1372672405


##########
be/src/vec/core/decomposed_float.h:
##########
@@ -113,16 +113,16 @@
         }
 
         /// The case of the most negative integer
-        if constexpr (is_signed_v<Int>) {
+        if constexpr (wide::is_signed_v<Int>) {
             if (rhs == std::numeric_limits<Int>::lowest()) {
                 assert(isNegative());
 
                 if (normalizedExponent() <
-                    static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>)) {
+                    static_cast<int16_t>(8 * sizeof(Int) - 
wide::is_signed_v<Int>)) {
                     return 1;
                 }
                 if (normalizedExponent() >
-                    static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>)) {
+                    static_cast<int16_t>(8 * sizeof(Int) - 
wide::is_signed_v<Int>)) {

Review Comment:
   warning: 8 is a magic number; consider replacing it with a named constant 
[readability-magic-numbers]
   ```cpp
                       static_cast<int16_t>(8 * sizeof(Int) - 
wide::is_signed_v<Int>)) {
                                            ^
   ```
   



##########
be/src/vec/core/decomposed_float.h:
##########
@@ -113,16 +113,16 @@ struct DecomposedFloat {
         }
 
         /// The case of the most negative integer
-        if constexpr (is_signed_v<Int>) {
+        if constexpr (wide::is_signed_v<Int>) {
             if (rhs == std::numeric_limits<Int>::lowest()) {
                 assert(isNegative());
 
                 if (normalizedExponent() <
-                    static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>)) {
+                    static_cast<int16_t>(8 * sizeof(Int) - 
wide::is_signed_v<Int>)) {

Review Comment:
   warning: 8 is a magic number; consider replacing it with a named constant 
[readability-magic-numbers]
   ```cpp
                       static_cast<int16_t>(8 * sizeof(Int) - 
wide::is_signed_v<Int>)) {
                                            ^
   ```
   



##########
be/src/vec/core/decomposed_float.h:
##########
@@ -134,7 +134,8 @@
         }
 
         /// Too large number: abs(float) > abs(rhs). Also the case with 
infinities and NaN.
-        if (normalizedExponent() >= static_cast<int16_t>(8 * sizeof(Int) - 
is_signed_v<Int>)) {
+        if (normalizedExponent() >=
+            static_cast<int16_t>(8 * sizeof(Int) - wide::is_signed_v<Int>)) {

Review Comment:
   warning: 8 is a magic number; consider replacing it with a named constant 
[readability-magic-numbers]
   ```cpp
               static_cast<int16_t>(8 * sizeof(Int) - wide::is_signed_v<Int>)) {
                                    ^
   ```
   



##########
be/src/vec/core/decomposed_float.h:
##########
@@ -149,7 +150,8 @@
         }
 
         /// Larger octave: abs(rhs) > abs(float)
-        if (normalizedExponent() + 1 < static_cast<int16_t>(8 * sizeof(Int) - 
is_signed_v<Int>) &&
+        if (normalizedExponent() + 1 <
+                    static_cast<int16_t>(8 * sizeof(Int) - 
wide::is_signed_v<Int>) &&

Review Comment:
   warning: 8 is a magic number; consider replacing it with a named constant 
[readability-magic-numbers]
   ```cpp
                       static_cast<int16_t>(8 * sizeof(Int) - 
wide::is_signed_v<Int>) &&
                                            ^
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to