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


##########
be/src/vec/runtime/vdatetime_value.h:
##########
@@ -1558,7 +1565,15 @@ class date_day_offset_dict {
 
     static bool get_dict_init();
 
-    DateV2Value<DateV2ValueType> operator[](int day) const;
+    inline DateV2Value<DateV2ValueType> operator[](int day) const {
+        int index = day + DAY_BEFORE_EPOCH;
+        if (LIKELY(index >= 0 && index < DICT_DAYS)) {

Review Comment:
   warning: boolean expression can be simplified by DeMorgan's theorem 
[readability-simplify-boolean-expr]
   ```cpp
           if (LIKELY(index >= 0 && index < DICT_DAYS)) {
               ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/common/compiler_util.h:34:** expanded from macro 'LIKELY'
   ```cpp
   #define LIKELY(expr) __builtin_expect(!!(expr), 1)
                                          ^
   ```
   
   </details>
   



-- 
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