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

Investigate MSVC warning in GeoHashConverter code

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Geo
    • None
    • Query
    • ALL

      The sizeEdge function triggered a warning in MSVC. It needs to be investigated to verify if the code warning should be ignored. The code was introduced in SERVER-15576.

      // Relative error = epsilon_(max-min). ldexp() is just a direct translation to
      // floating point exponent, and should be exact.
      double GeoHashConverter::sizeEdge(unsigned level) const {
          invariant(level >= 0);
          invariant((int)level <= _params.bits);
      #pragma warning(push) 
      // C4146: unary minus operator applied to unsigned type, result still unsigned
      #pragma warning(disable : 4146)
          return ldexp(_params.max - _params.min, -level);
      #pragma warning(pop)
      }
      

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: