Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-51485

dependency on absl internals in getCodePointLength

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Service arch 2020-10-19
    • 0

      Reaching into the absl internals is dangerous.
      It's unnecessary in this case, and should be avoided.

      + #include "mongo/platform/bits.h"
      ...
      getCodePointLength
      -    return absl::base_internal::CountLeadingZeros64(~(uint64_t(charByte) << (64 - 8)));
      +    return countLeadingZeros64(~static_cast<unsigned char>(charByte)) - (64 - 8);
       }
      

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: