Hi Sebastian & Ralf,

I've done a review of the problem comparison method and come up with
the following:

bool ObjectCache::ClassComp::operator() (const
ObjectCache::FileNameOptionsPair& lhs, const
ObjectCache::FileNameOptionsPair& rhs) const
{
    // check if filename are the same
    if (lhs.first < rhs.first) return true;
    if (rhs.first < lhs.first) return false;

    // check if Options pointers are the same.
    if (lhs.second == rhs.second) return false;

    // need to compare Options pointers
    if (lhs.second.valid() && rhs.second.valid())
    {
        // lhs & rhs have valid Options objects
        return *lhs.second < *rhs.second;
    }

    // finally use pointer comparison, expecting at least one will be
NULL pointer
    return lhs.second < rhs.second;
}

I have checked this is git master.  Could you both test this out?

Thanks,
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to