UNINITIALIZED在哪里阅读?

时间:2014-12-11 10:10:10

标签: c++ qt

internals::PointLatLng MercatorProjection::FromPixelToLatLng(const int &x, const int &y, const int &zoom)
{
    internals::PointLatLng ret;// = internals::PointLatLng.Empty;

    Size s = GetTileMatrixSizePixel(zoom);
    double mapSizeX = s.Width();
    double mapSizeY = s.Height();

    double xx = (Clip(x, 0, mapSizeX - 1) / mapSizeX) - 0.5;
    double yy = 0.5 - (Clip(y, 0, mapSizeY - 1) / mapSizeY);

    ret.SetLat(90 - 360 * atan(exp(-yy * 2 * M_PI)) / M_PI);
    ret.SetLng(360 * xx);

    return ret;
}
double MercatorProjection::Clip(const double &n, const double &minValue, const double &maxValue)  const
{
    return qMin(qMax(n, minValue), maxValue);
}

我有上面的代码,我使用Dr. Memory检查我的程序,但它总是抱怨有

 UNINITIALIZED READ: reading 0x0037e410-0x0037e414 4 byte(s)

at

    double xx = (Clip(x, 0, mapSizeX - 1) / mapSizeX) - 0.5;
    double yy = 0.5 - (Clip(y, 0, mapSizeY - 1) / mapSizeY);

出了什么问题?

0 个答案:

没有答案